<!DOCTYPE html>
<html lang="en" class="js csstransforms3d">
  <head>
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no">
    <meta name="generator" content="Hugo 0.37.1" />
    <meta name="description" content="">


    <link rel="shortcut icon" href="https://shardingsphere.apache.org/document/current/img/favicon.png" type="image/x-icon" />

    <title>Spring Namespace Configuration :: ShardingSphere</title>
    
    
    <link href="https://shardingsphere.apache.org/document/current/css/nucleus.css?1584863719" rel="stylesheet">
    <link href="https://shardingsphere.apache.org/document/current/css/font-awesome.min.css?1584863719" rel="stylesheet">
    <link href="https://shardingsphere.apache.org/document/current/css/hybrid.css?1584863719" rel="stylesheet">
    <link href="https://shardingsphere.apache.org/document/current/css/featherlight.min.css?1584863719" rel="stylesheet">
    <link href="https://shardingsphere.apache.org/document/current/css/perfect-scrollbar.min.css?1584863719" rel="stylesheet">
    <link href="https://shardingsphere.apache.org/document/current/css/auto-complete.css?1584863719" rel="stylesheet">
    <link href="https://shardingsphere.apache.org/document/current/css/theme.css?1584863719" rel="stylesheet">
    <link href="https://shardingsphere.apache.org/document/current/css/hugo-theme.css?1584863719" rel="stylesheet">
    
      <link href="https://shardingsphere.apache.org/document/current/css/theme-black.css?1584863719" rel="stylesheet">
    

    <script src="https://shardingsphere.apache.org/document/current/js/jquery-2.x.min.js?1584863719"></script>
    
    <style type="text/css">
      :root #header + #content > #left > #rlblock_left{ 
          display:none !important;
      }
      
    </style>
    

  </head>
  <body class="" data-url="/en/manual/sharding-jdbc/configuration/config-spring-namespace/">
    <nav id="sidebar" class="">



  <div id="header-wrapper">
    <div id="header">
      <a href="https://shardingsphere.apache.org/"><img src="https://shardingsphere.apache.org/document/current/img/logo_v2.png" /></a>

    </div>
    
  </div>

    <div class="highlightable">
    <ul class="topics">

        
          
          


 
  
    
    <li data-nav-id="/en/overview/" title="Overview" class="dd-item 
        
        
        
        ">
            
      <a href="https://shardingsphere.apache.org/document/current/en/overview/">
         <i class="collapse" style="display:inline; font-family:'courier';">
         
            <svg  viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="5375" width="20" height="20"></svg>
          
          </i>
          <b>1. </b>Overview
          
      </a>
      
              
    </li>
  
 

          
          


 
  
    
    <li data-nav-id="/en/quick-start/" title="Quick Start" class="dd-item 
        
        
        
        ">
            
      <a href="https://shardingsphere.apache.org/document/current/en/quick-start/">
         <i class="collapse" style="display:inline; font-family:'courier';">
         
             <svg  class="icon icon-down" 
              style="display: none;"
              viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg"   width="20" height="20" fill="#777">
              <path d="M500.8 604.778667L267.306667 371.392l-45.226667 45.269333 278.741333 278.613334 278.485334-278.613334-45.248-45.248z" p-id="5376" ></path>
            </svg>
            <svg  class="icon icon-right" 
              style="display: inline-block;"
              viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg"  width="20" height="20" fill="#777">
              <path d="M593.450667 512.128L360.064 278.613333l45.290667-45.226666 278.613333 278.762666L405.333333 790.613333l-45.226666-45.269333z" p-id="5605" ></path>
            </svg>
          
          </i>
          <b>2. </b>Quick Start
          
      </a>
      
      
        <ul>
          
          
          
          
        
          
            
            


 
  
    
      <li data-nav-id="/en/quick-start/sharding-jdbc-quick-start/" title="Sharding-JDBC" class="dd-item ">
        <a href="https://shardingsphere.apache.org/document/current/en/quick-start/sharding-jdbc-quick-start/">
          <svg  viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="5375" width="20" height="20"></svg>
        <b>2.1. </b>Sharding-JDBC
        
        </a>
    </li>
     
  
 

            
          
            
            


 
  
    
      <li data-nav-id="/en/quick-start/sharding-proxy-quick-start/" title="Sharding-Proxy" class="dd-item ">
        <a href="https://shardingsphere.apache.org/document/current/en/quick-start/sharding-proxy-quick-start/">
          <svg  viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="5375" width="20" height="20"></svg>
        <b>2.2. </b>Sharding-Proxy
        
        </a>
    </li>
     
  
 

            
          
        
        </ul>
              
    </li>
  
 

          
          


 
  
    
    <li data-nav-id="/en/features/" title="Concepts &amp; Features" class="dd-item 
        
        
        
        ">
            
      <a href="https://shardingsphere.apache.org/document/current/en/features/">
         <i class="collapse" style="display:inline; font-family:'courier';">
         
             <svg  class="icon icon-down" 
              style="display: none;"
              viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg"   width="20" height="20" fill="#777">
              <path d="M500.8 604.778667L267.306667 371.392l-45.226667 45.269333 278.741333 278.613334 278.485334-278.613334-45.248-45.248z" p-id="5376" ></path>
            </svg>
            <svg  class="icon icon-right" 
              style="display: inline-block;"
              viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg"  width="20" height="20" fill="#777">
              <path d="M593.450667 512.128L360.064 278.613333l45.290667-45.226666 278.613333 278.762666L405.333333 790.613333l-45.226666-45.269333z" p-id="5605" ></path>
            </svg>
          
          </i>
          <b>3. </b>Concepts &amp; Features
          
      </a>
      
      
        <ul>
          
          
            
          
          
          
        
          
            
            


 
  
    
    <li data-nav-id="/en/features/sharding/" title="Sharding" class="dd-item 
        
        
        
        ">
            
      <a href="https://shardingsphere.apache.org/document/current/en/features/sharding/">
         <i class="collapse" style="display:inline; font-family:'courier';">
         
             <svg  class="icon icon-down" 
              style="display: none;"
              viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg"   width="20" height="20" fill="#777">
              <path d="M500.8 604.778667L267.306667 371.392l-45.226667 45.269333 278.741333 278.613334 278.485334-278.613334-45.248-45.248z" p-id="5376" ></path>
            </svg>
            <svg  class="icon icon-right" 
              style="display: inline-block;"
              viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg"  width="20" height="20" fill="#777">
              <path d="M593.450667 512.128L360.064 278.613333l45.290667-45.226666 278.613333 278.762666L405.333333 790.613333l-45.226666-45.269333z" p-id="5605" ></path>
            </svg>
          
          </i>
          <b>3.1. </b>Sharding
          
      </a>
      
      
        <ul>
          
          
            
          
          
          
        
          
            
            


 
  
    
    <li data-nav-id="/en/features/sharding/concept/" title="Core Concept" class="dd-item 
        
        
        
        ">
            
      <a href="https://shardingsphere.apache.org/document/current/en/features/sharding/concept/">
         <i class="collapse" style="display:inline; font-family:'courier';">
         
             <svg  class="icon icon-down" 
              style="display: none;"
              viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg"   width="20" height="20" fill="#777">
              <path d="M500.8 604.778667L267.306667 371.392l-45.226667 45.269333 278.741333 278.613334 278.485334-278.613334-45.248-45.248z" p-id="5376" ></path>
            </svg>
            <svg  class="icon icon-right" 
              style="display: inline-block;"
              viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg"  width="20" height="20" fill="#777">
              <path d="M593.450667 512.128L360.064 278.613333l45.290667-45.226666 278.613333 278.762666L405.333333 790.613333l-45.226666-45.269333z" p-id="5605" ></path>
            </svg>
          
          </i>
          <b>3.1.1. </b>Core Concept
          
      </a>
      
      
        <ul>
          
          
          
          
        
          
            
            


 
  
    
      <li data-nav-id="/en/features/sharding/concept/sql/" title="SQL" class="dd-item ">
        <a href="https://shardingsphere.apache.org/document/current/en/features/sharding/concept/sql/">
          <svg  viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="5375" width="20" height="20"></svg>
        SQL
        
        </a>
    </li>
     
  
 

            
          
            
            


 
  
    
      <li data-nav-id="/en/features/sharding/concept/sharding/" title="Sharding" class="dd-item ">
        <a href="https://shardingsphere.apache.org/document/current/en/features/sharding/concept/sharding/">
          <svg  viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="5375" width="20" height="20"></svg>
        Sharding
        
        </a>
    </li>
     
  
 

            
          
            
            


 
  
    
      <li data-nav-id="/en/features/sharding/concept/configuration/" title="Configuration" class="dd-item ">
        <a href="https://shardingsphere.apache.org/document/current/en/features/sharding/concept/configuration/">
          <svg  viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="5375" width="20" height="20"></svg>
        Configuration
        
        </a>
    </li>
     
  
 

            
          
        
        </ul>
              
    </li>
  
 

            
          
            
            


 
  
    
    <li data-nav-id="/en/features/sharding/principle/" title="Guide to Kernel" class="dd-item 
        
        
        
        ">
            
      <a href="https://shardingsphere.apache.org/document/current/en/features/sharding/principle/">
         <i class="collapse" style="display:inline; font-family:'courier';">
         
             <svg  class="icon icon-down" 
              style="display: none;"
              viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg"   width="20" height="20" fill="#777">
              <path d="M500.8 604.778667L267.306667 371.392l-45.226667 45.269333 278.741333 278.613334 278.485334-278.613334-45.248-45.248z" p-id="5376" ></path>
            </svg>
            <svg  class="icon icon-right" 
              style="display: inline-block;"
              viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg"  width="20" height="20" fill="#777">
              <path d="M593.450667 512.128L360.064 278.613333l45.290667-45.226666 278.613333 278.762666L405.333333 790.613333l-45.226666-45.269333z" p-id="5605" ></path>
            </svg>
          
          </i>
          <b>3.1.2. </b>Guide to Kernel
          
      </a>
      
      
        <ul>
          
          
          
          
        
          
            
            


 
  
    
      <li data-nav-id="/en/features/sharding/principle/parse/" title="Parse Engine" class="dd-item ">
        <a href="https://shardingsphere.apache.org/document/current/en/features/sharding/principle/parse/">
          <svg  viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="5375" width="20" height="20"></svg>
        Parse Engine
        
        </a>
    </li>
     
  
 

            
          
            
            


 
  
    
      <li data-nav-id="/en/features/sharding/principle/route/" title="Route Engine" class="dd-item ">
        <a href="https://shardingsphere.apache.org/document/current/en/features/sharding/principle/route/">
          <svg  viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="5375" width="20" height="20"></svg>
        Route Engine
        
        </a>
    </li>
     
  
 

            
          
            
            


 
  
    
      <li data-nav-id="/en/features/sharding/principle/rewrite/" title="Rewrite Engine" class="dd-item ">
        <a href="https://shardingsphere.apache.org/document/current/en/features/sharding/principle/rewrite/">
          <svg  viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="5375" width="20" height="20"></svg>
        Rewrite Engine
        
        </a>
    </li>
     
  
 

            
          
            
            


 
  
    
      <li data-nav-id="/en/features/sharding/principle/execute/" title="Execute Engine" class="dd-item ">
        <a href="https://shardingsphere.apache.org/document/current/en/features/sharding/principle/execute/">
          <svg  viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="5375" width="20" height="20"></svg>
        Execute Engine
        
        </a>
    </li>
     
  
 

            
          
            
            


 
  
    
      <li data-nav-id="/en/features/sharding/principle/merge/" title="Merger Engine" class="dd-item ">
        <a href="https://shardingsphere.apache.org/document/current/en/features/sharding/principle/merge/">
          <svg  viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="5375" width="20" height="20"></svg>
        Merger Engine
        
        </a>
    </li>
     
  
 

            
          
        
        </ul>
              
    </li>
  
 

            
          
            
            


 
  
    
    <li data-nav-id="/en/features/sharding/use-norms/" title="Use Norms" class="dd-item 
        
        
        
        ">
            
      <a href="https://shardingsphere.apache.org/document/current/en/features/sharding/use-norms/">
         <i class="collapse" style="display:inline; font-family:'courier';">
         
             <svg  class="icon icon-down" 
              style="display: none;"
              viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg"   width="20" height="20" fill="#777">
              <path d="M500.8 604.778667L267.306667 371.392l-45.226667 45.269333 278.741333 278.613334 278.485334-278.613334-45.248-45.248z" p-id="5376" ></path>
            </svg>
            <svg  class="icon icon-right" 
              style="display: inline-block;"
              viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg"  width="20" height="20" fill="#777">
              <path d="M593.450667 512.128L360.064 278.613333l45.290667-45.226666 278.613333 278.762666L405.333333 790.613333l-45.226666-45.269333z" p-id="5605" ></path>
            </svg>
          
          </i>
          <b>3.1.3. </b>Use Norms
          
      </a>
      
      
        <ul>
          
          
          
          
        
          
            
            


 
  
    
      <li data-nav-id="/en/features/sharding/use-norms/sql/" title="SQL" class="dd-item ">
        <a href="https://shardingsphere.apache.org/document/current/en/features/sharding/use-norms/sql/">
          <svg  viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="5375" width="20" height="20"></svg>
        SQL
        
        </a>
    </li>
     
  
 

            
          
            
            


 
  
    
      <li data-nav-id="/en/features/sharding/use-norms/pagination/" title="Pagination" class="dd-item ">
        <a href="https://shardingsphere.apache.org/document/current/en/features/sharding/use-norms/pagination/">
          <svg  viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="5375" width="20" height="20"></svg>
        Pagination
        
        </a>
    </li>
     
  
 

            
          
            
            


 
  
    
      <li data-nav-id="/en/features/sharding/use-norms/parser/" title="Parser" class="dd-item ">
        <a href="https://shardingsphere.apache.org/document/current/en/features/sharding/use-norms/parser/">
          <svg  viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="5375" width="20" height="20"></svg>
        Parser
        
        </a>
    </li>
     
  
 

            
          
        
        </ul>
              
    </li>
  
 

            
          
            
            


 
  
    
    <li data-nav-id="/en/features/sharding/other-features/" title="Other Features" class="dd-item 
        
        
        
        ">
            
      <a href="https://shardingsphere.apache.org/document/current/en/features/sharding/other-features/">
         <i class="collapse" style="display:inline; font-family:'courier';">
         
             <svg  class="icon icon-down" 
              style="display: none;"
              viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg"   width="20" height="20" fill="#777">
              <path d="M500.8 604.778667L267.306667 371.392l-45.226667 45.269333 278.741333 278.613334 278.485334-278.613334-45.248-45.248z" p-id="5376" ></path>
            </svg>
            <svg  class="icon icon-right" 
              style="display: inline-block;"
              viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg"  width="20" height="20" fill="#777">
              <path d="M593.450667 512.128L360.064 278.613333l45.290667-45.226666 278.613333 278.762666L405.333333 790.613333l-45.226666-45.269333z" p-id="5605" ></path>
            </svg>
          
          </i>
          <b>3.1.4. </b>Other Features
          
      </a>
      
      
        <ul>
          
          
          
          
        
          
            
            


 
  
    
      <li data-nav-id="/en/features/sharding/other-features/inline-expression/" title="Inline Expression" class="dd-item ">
        <a href="https://shardingsphere.apache.org/document/current/en/features/sharding/other-features/inline-expression/">
          <svg  viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="5375" width="20" height="20"></svg>
        Inline Expression
        
        </a>
    </li>
     
  
 

            
          
            
            


 
  
    
      <li data-nav-id="/en/features/sharding/other-features/key-generator/" title="Distributed Primary Key" class="dd-item ">
        <a href="https://shardingsphere.apache.org/document/current/en/features/sharding/other-features/key-generator/">
          <svg  viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="5375" width="20" height="20"></svg>
        Distributed Primary Key
        
        </a>
    </li>
     
  
 

            
          
            
            


 
  
    
      <li data-nav-id="/en/features/sharding/other-features/sharding-hint/" title="Sharding Hint" class="dd-item ">
        <a href="https://shardingsphere.apache.org/document/current/en/features/sharding/other-features/sharding-hint/">
          <svg  viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="5375" width="20" height="20"></svg>
        Sharding Hint
        
        </a>
    </li>
     
  
 

            
          
        
        </ul>
              
    </li>
  
 

            
          
        
        </ul>
              
    </li>
  
 

            
          
            
            


 
  
    
    <li data-nav-id="/en/features/read-write-split/" title="Read-write splitting" class="dd-item 
        
        
        
        ">
            
      <a href="https://shardingsphere.apache.org/document/current/en/features/read-write-split/">
         <i class="collapse" style="display:inline; font-family:'courier';">
         
             <svg  class="icon icon-down" 
              style="display: none;"
              viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg"   width="20" height="20" fill="#777">
              <path d="M500.8 604.778667L267.306667 371.392l-45.226667 45.269333 278.741333 278.613334 278.485334-278.613334-45.248-45.248z" p-id="5376" ></path>
            </svg>
            <svg  class="icon icon-right" 
              style="display: inline-block;"
              viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg"  width="20" height="20" fill="#777">
              <path d="M593.450667 512.128L360.064 278.613333l45.290667-45.226666 278.613333 278.762666L405.333333 790.613333l-45.226666-45.269333z" p-id="5605" ></path>
            </svg>
          
          </i>
          <b>3.2. </b>Read-write splitting
          
      </a>
      
      
        <ul>
          
          
          
          
        
          
            
            


 
  
    
      <li data-nav-id="/en/features/read-write-split/concept/" title="Core Concept" class="dd-item ">
        <a href="https://shardingsphere.apache.org/document/current/en/features/read-write-split/concept/">
          <svg  viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="5375" width="20" height="20"></svg>
        <b>3.2.1. </b>Core Concept
        
        </a>
    </li>
     
  
 

            
          
            
            


 
  
    
      <li data-nav-id="/en/features/read-write-split/core-features/" title="Core Features" class="dd-item ">
        <a href="https://shardingsphere.apache.org/document/current/en/features/read-write-split/core-features/">
          <svg  viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="5375" width="20" height="20"></svg>
        <b>3.2.2. </b>Core Features
        
        </a>
    </li>
     
  
 

            
          
            
            


 
  
    
      <li data-nav-id="/en/features/read-write-split/unsupported-items/" title="Unsupported Items" class="dd-item ">
        <a href="https://shardingsphere.apache.org/document/current/en/features/read-write-split/unsupported-items/">
          <svg  viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="5375" width="20" height="20"></svg>
        <b>3.2.3. </b>Unsupported Items
        
        </a>
    </li>
     
  
 

            
          
        
        </ul>
              
    </li>
  
 

            
          
            
            


 
  
    
    <li data-nav-id="/en/features/orchestration/" title="Orchestration" class="dd-item 
        
        
        
        ">
            
      <a href="https://shardingsphere.apache.org/document/current/en/features/orchestration/">
         <i class="collapse" style="display:inline; font-family:'courier';">
         
             <svg  class="icon icon-down" 
              style="display: none;"
              viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg"   width="20" height="20" fill="#777">
              <path d="M500.8 604.778667L267.306667 371.392l-45.226667 45.269333 278.741333 278.613334 278.485334-278.613334-45.248-45.248z" p-id="5376" ></path>
            </svg>
            <svg  class="icon icon-right" 
              style="display: inline-block;"
              viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg"  width="20" height="20" fill="#777">
              <path d="M593.450667 512.128L360.064 278.613333l45.290667-45.226666 278.613333 278.762666L405.333333 790.613333l-45.226666-45.269333z" p-id="5605" ></path>
            </svg>
          
          </i>
          <b>3.3. </b>Orchestration
          
      </a>
      
      
        <ul>
          
          
          
          
        
          
            
            


 
  
    
      <li data-nav-id="/en/features/orchestration/config-center/" title="Config Center" class="dd-item ">
        <a href="https://shardingsphere.apache.org/document/current/en/features/orchestration/config-center/">
          <svg  viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="5375" width="20" height="20"></svg>
        <b>3.3.1. </b>Config Center
        
        </a>
    </li>
     
  
 

            
          
            
            


 
  
    
      <li data-nav-id="/en/features/orchestration/orchestration/" title="Orchestration" class="dd-item ">
        <a href="https://shardingsphere.apache.org/document/current/en/features/orchestration/orchestration/">
          <svg  viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="5375" width="20" height="20"></svg>
        <b>3.3.2. </b>Orchestration
        
        </a>
    </li>
     
  
 

            
          
            
            


 
  
    
      <li data-nav-id="/en/features/orchestration/supported-registry-repo/" title="Available Registry Center" class="dd-item ">
        <a href="https://shardingsphere.apache.org/document/current/en/features/orchestration/supported-registry-repo/">
          <svg  viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="5375" width="20" height="20"></svg>
        <b>3.3.3. </b>Available Registry Center
        
        </a>
    </li>
     
  
 

            
          
            
            


 
  
    
      <li data-nav-id="/en/features/orchestration/apm-integration/" title="APM Integration" class="dd-item ">
        <a href="https://shardingsphere.apache.org/document/current/en/features/orchestration/apm-integration/">
          <svg  viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="5375" width="20" height="20"></svg>
        <b>3.3.4. </b>APM Integration
        
        </a>
    </li>
     
  
 

            
          
            
            


 
  
    
      <li data-nav-id="/en/features/orchestration/encrypt/" title="Data Masking" class="dd-item ">
        <a href="https://shardingsphere.apache.org/document/current/en/features/orchestration/encrypt/">
          <svg  viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="5375" width="20" height="20"></svg>
        <b>3.3.5. </b>Data Masking
        
        </a>
    </li>
     
  
 

            
          
        
        </ul>
              
    </li>
  
 

            
          
            
            


 
  
    
    <li data-nav-id="/en/features/transaction/" title="Distributed Transaction" class="dd-item 
        
        
        
        ">
            
      <a href="https://shardingsphere.apache.org/document/current/en/features/transaction/">
         <i class="collapse" style="display:inline; font-family:'courier';">
         
             <svg  class="icon icon-down" 
              style="display: none;"
              viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg"   width="20" height="20" fill="#777">
              <path d="M500.8 604.778667L267.306667 371.392l-45.226667 45.269333 278.741333 278.613334 278.485334-278.613334-45.248-45.248z" p-id="5376" ></path>
            </svg>
            <svg  class="icon icon-right" 
              style="display: inline-block;"
              viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg"  width="20" height="20" fill="#777">
              <path d="M593.450667 512.128L360.064 278.613333l45.290667-45.226666 278.613333 278.762666L405.333333 790.613333l-45.226666-45.269333z" p-id="5605" ></path>
            </svg>
          
          </i>
          <b>3.4. </b>Distributed Transaction
          
      </a>
      
      
        <ul>
          
          
            
          
          
          
        
          
            
            


 
  
    
    <li data-nav-id="/en/features/transaction/concept/" title="Core Concept" class="dd-item 
        
        
        
        ">
            
      <a href="https://shardingsphere.apache.org/document/current/en/features/transaction/concept/">
         <i class="collapse" style="display:inline; font-family:'courier';">
         
             <svg  class="icon icon-down" 
              style="display: none;"
              viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg"   width="20" height="20" fill="#777">
              <path d="M500.8 604.778667L267.306667 371.392l-45.226667 45.269333 278.741333 278.613334 278.485334-278.613334-45.248-45.248z" p-id="5376" ></path>
            </svg>
            <svg  class="icon icon-right" 
              style="display: inline-block;"
              viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg"  width="20" height="20" fill="#777">
              <path d="M593.450667 512.128L360.064 278.613333l45.290667-45.226666 278.613333 278.762666L405.333333 790.613333l-45.226666-45.269333z" p-id="5605" ></path>
            </svg>
          
          </i>
          <b>3.4.1. </b>Core Concept
          
      </a>
      
      
        <ul>
          
          
          
          
        
          
            
            


 
  
    
      <li data-nav-id="/en/features/transaction/concept/2pc-xa-transaction/" title="2PC Transaction-XA" class="dd-item ">
        <a href="https://shardingsphere.apache.org/document/current/en/features/transaction/concept/2pc-xa-transaction/">
          <svg  viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="5375" width="20" height="20"></svg>
        <b>3.4.1.1 </b>2PC Transaction-XA
        
        </a>
    </li>
     
  
 

            
          
            
            


 
  
    
      <li data-nav-id="/en/features/transaction/concept/base-transaction-saga/" title="Saga BASE Transaction" class="dd-item ">
        <a href="https://shardingsphere.apache.org/document/current/en/features/transaction/concept/base-transaction-saga/">
          <svg  viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="5375" width="20" height="20"></svg>
        <b>3.4.1.2 </b>Saga BASE Transaction
        
        </a>
    </li>
     
  
 

            
          
            
            


 
  
    
      <li data-nav-id="/en/features/transaction/concept/base-transaction-seata/" title="Seata BASE transaction" class="dd-item ">
        <a href="https://shardingsphere.apache.org/document/current/en/features/transaction/concept/base-transaction-seata/">
          <svg  viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="5375" width="20" height="20"></svg>
        <b>3.4.1.3 </b>Seata BASE transaction
        
        </a>
    </li>
     
  
 

            
          
        
        </ul>
              
    </li>
  
 

            
          
            
            


 
  
    
    <li data-nav-id="/en/features/transaction/function/" title="Supported Function" class="dd-item 
        
        
        
        ">
            
      <a href="https://shardingsphere.apache.org/document/current/en/features/transaction/function/">
         <i class="collapse" style="display:inline; font-family:'courier';">
         
             <svg  class="icon icon-down" 
              style="display: none;"
              viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg"   width="20" height="20" fill="#777">
              <path d="M500.8 604.778667L267.306667 371.392l-45.226667 45.269333 278.741333 278.613334 278.485334-278.613334-45.248-45.248z" p-id="5376" ></path>
            </svg>
            <svg  class="icon icon-right" 
              style="display: inline-block;"
              viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg"  width="20" height="20" fill="#777">
              <path d="M593.450667 512.128L360.064 278.613333l45.290667-45.226666 278.613333 278.762666L405.333333 790.613333l-45.226666-45.269333z" p-id="5605" ></path>
            </svg>
          
          </i>
          <b>3.4.2. </b>Supported Function
          
      </a>
      
      
        <ul>
          
          
          
          
        
          
            
            


 
  
    
      <li data-nav-id="/en/features/transaction/function/local-transaction/" title="Local Transaction" class="dd-item ">
        <a href="https://shardingsphere.apache.org/document/current/en/features/transaction/function/local-transaction/">
          <svg  viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="5375" width="20" height="20"></svg>
        <b>3.4.2.1 </b>Local Transaction
        
        </a>
    </li>
     
  
 

            
          
            
            


 
  
    
      <li data-nav-id="/en/features/transaction/function/2pc-xa-transaction/" title="2PC transaction-XA" class="dd-item ">
        <a href="https://shardingsphere.apache.org/document/current/en/features/transaction/function/2pc-xa-transaction/">
          <svg  viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="5375" width="20" height="20"></svg>
        <b>3.4.2.2 </b>2PC transaction-XA
        
        </a>
    </li>
     
  
 

            
          
            
            


 
  
    
      <li data-nav-id="/en/features/transaction/function/base-transaction-saga/" title="BASE Transaction saga" class="dd-item ">
        <a href="https://shardingsphere.apache.org/document/current/en/features/transaction/function/base-transaction-saga/">
          <svg  viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="5375" width="20" height="20"></svg>
        <b>3.4.2.3 </b>BASE Transaction saga
        
        </a>
    </li>
     
  
 

            
          
            
            


 
  
    
      <li data-nav-id="/en/features/transaction/function/base-transaction-seata/" title="Seata BASE transaction" class="dd-item ">
        <a href="https://shardingsphere.apache.org/document/current/en/features/transaction/function/base-transaction-seata/">
          <svg  viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="5375" width="20" height="20"></svg>
        <b>3.4.2.4 </b>Seata BASE transaction
        
        </a>
    </li>
     
  
 

            
          
        
        </ul>
              
    </li>
  
 

            
          
            
            


 
  
    
    <li data-nav-id="/en/features/transaction/principle/" title="Principle" class="dd-item 
        
        
        
        ">
            
      <a href="https://shardingsphere.apache.org/document/current/en/features/transaction/principle/">
         <i class="collapse" style="display:inline; font-family:'courier';">
         
             <svg  class="icon icon-down" 
              style="display: none;"
              viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg"   width="20" height="20" fill="#777">
              <path d="M500.8 604.778667L267.306667 371.392l-45.226667 45.269333 278.741333 278.613334 278.485334-278.613334-45.248-45.248z" p-id="5376" ></path>
            </svg>
            <svg  class="icon icon-right" 
              style="display: inline-block;"
              viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg"  width="20" height="20" fill="#777">
              <path d="M593.450667 512.128L360.064 278.613333l45.290667-45.226666 278.613333 278.762666L405.333333 790.613333l-45.226666-45.269333z" p-id="5605" ></path>
            </svg>
          
          </i>
          <b>3.4.3. </b>Principle
          
      </a>
      
      
        <ul>
          
          
          
          
        
          
            
            


 
  
    
      <li data-nav-id="/en/features/transaction/principle/2pc-xa-transaction/" title="2PC transaction-XA" class="dd-item ">
        <a href="https://shardingsphere.apache.org/document/current/en/features/transaction/principle/2pc-xa-transaction/">
          <svg  viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="5375" width="20" height="20"></svg>
        <b>3.4.3.1 </b>2PC transaction-XA
        
        </a>
    </li>
     
  
 

            
          
            
            


 
  
    
      <li data-nav-id="/en/features/transaction/principle/base-transaction-saga/" title="BASE Transaction Saga" class="dd-item ">
        <a href="https://shardingsphere.apache.org/document/current/en/features/transaction/principle/base-transaction-saga/">
          <svg  viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="5375" width="20" height="20"></svg>
        <b>3.4.3.2 </b>BASE Transaction Saga
        
        </a>
    </li>
     
  
 

            
          
            
            


 
  
    
      <li data-nav-id="/en/features/transaction/principle/base-transaction-seata/" title="Seata BASE transaction" class="dd-item ">
        <a href="https://shardingsphere.apache.org/document/current/en/features/transaction/principle/base-transaction-seata/">
          <svg  viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="5375" width="20" height="20"></svg>
        <b>3.4.3.3 </b>Seata BASE transaction
        
        </a>
    </li>
     
  
 

            
          
        
        </ul>
              
    </li>
  
 

            
          
        
        </ul>
              
    </li>
  
 

            
          
            
            


 
  
    
    <li data-nav-id="/en/features/spi/" title="SPI" class="dd-item 
        
        
        
        ">
            
      <a href="https://shardingsphere.apache.org/document/current/en/features/spi/">
         <i class="collapse" style="display:inline; font-family:'courier';">
         
            <svg  viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="5375" width="20" height="20"></svg>
          
          </i>
          <b>3.5. </b>SPI
          
      </a>
      
              
    </li>
  
 

            
          
            
            


 
  
    
    <li data-nav-id="/en/features/test-engine/" title="Test Engine" class="dd-item 
        
        
        
        ">
            
      <a href="https://shardingsphere.apache.org/document/current/en/features/test-engine/">
         <i class="collapse" style="display:inline; font-family:'courier';">
         
             <svg  class="icon icon-down" 
              style="display: none;"
              viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg"   width="20" height="20" fill="#777">
              <path d="M500.8 604.778667L267.306667 371.392l-45.226667 45.269333 278.741333 278.613334 278.485334-278.613334-45.248-45.248z" p-id="5376" ></path>
            </svg>
            <svg  class="icon icon-right" 
              style="display: inline-block;"
              viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg"  width="20" height="20" fill="#777">
              <path d="M593.450667 512.128L360.064 278.613333l45.290667-45.226666 278.613333 278.762666L405.333333 790.613333l-45.226666-45.269333z" p-id="5605" ></path>
            </svg>
          
          </i>
          <b>3.6. </b>Test Engine
          
      </a>
      
      
        <ul>
          
          
          
          
        
          
            
            


 
  
    
      <li data-nav-id="/en/features/test-engine/sql-case/" title="SQL Case" class="dd-item ">
        <a href="https://shardingsphere.apache.org/document/current/en/features/test-engine/sql-case/">
          <svg  viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="5375" width="20" height="20"></svg>
        <b>3.6.1. </b>SQL Case
        
        </a>
    </li>
     
  
 

            
          
            
            


 
  
    
      <li data-nav-id="/en/features/test-engine/integration-test-engine/" title="Integration Test Engine" class="dd-item ">
        <a href="https://shardingsphere.apache.org/document/current/en/features/test-engine/integration-test-engine/">
          <svg  viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="5375" width="20" height="20"></svg>
        <b>3.6.2. </b>Integration Test Engine
        
        </a>
    </li>
     
  
 

            
          
            
            


 
  
    
      <li data-nav-id="/en/features/test-engine/parse-test-engine/" title="SQL Parse Test Engine" class="dd-item ">
        <a href="https://shardingsphere.apache.org/document/current/en/features/test-engine/parse-test-engine/">
          <svg  viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="5375" width="20" height="20"></svg>
        <b>3.6.3. </b>SQL Parse Test Engine
        
        </a>
    </li>
     
  
 

            
          
            
            


 
  
    
      <li data-nav-id="/en/features/test-engine/rewrite-test-engine/" title="SQL Rewrite Test Engine" class="dd-item ">
        <a href="https://shardingsphere.apache.org/document/current/en/features/test-engine/rewrite-test-engine/">
          <svg  viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="5375" width="20" height="20"></svg>
        <b>3.6.4. </b>SQL Rewrite Test Engine
        
        </a>
    </li>
     
  
 

            
          
            
            


 
  
    
      <li data-nav-id="/en/features/test-engine/performance-test/" title="Performance Test" class="dd-item ">
        <a href="https://shardingsphere.apache.org/document/current/en/features/test-engine/performance-test/">
          <svg  viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="5375" width="20" height="20"></svg>
        <b>3.6.5. </b>Performance Test
        
        </a>
    </li>
     
  
 

            
          
        
        </ul>
              
    </li>
  
 

            
          
        
        </ul>
              
    </li>
  
 

          
          


 
  
    
    <li data-nav-id="/en/manual/" title="User Manual" class="dd-item 
        parent
        
        
        ">
            
      <a href="https://shardingsphere.apache.org/document/current/en/manual/">
         <i class="collapse" style="display:inline; font-family:'courier';">
         
             <svg  class="icon icon-down" 
              style="display: inline-block;"
              viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg"   width="20" height="20" fill="#777">
              <path d="M500.8 604.778667L267.306667 371.392l-45.226667 45.269333 278.741333 278.613334 278.485334-278.613334-45.248-45.248z" p-id="5376" ></path>
            </svg>
            <svg  class="icon icon-right" 
              style="display: none;"
              viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg"  width="20" height="20" fill="#777">
              <path d="M593.450667 512.128L360.064 278.613333l45.290667-45.226666 278.613333 278.762666L405.333333 790.613333l-45.226666-45.269333z" p-id="5605" ></path>
            </svg>
          
          </i>
          <b>4. </b>User Manual
          
      </a>
      
      
        <ul>
          
          
            
          
          
          
        
          
            
            


 
  
    
    <li data-nav-id="/en/manual/sharding-jdbc/" title="Sharding-JDBC" class="dd-item 
        parent
        
        
        ">
            
      <a href="https://shardingsphere.apache.org/document/current/en/manual/sharding-jdbc/">
         <i class="collapse" style="display:inline; font-family:'courier';">
         
             <svg  class="icon icon-down" 
              style="display: inline-block;"
              viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg"   width="20" height="20" fill="#777">
              <path d="M500.8 604.778667L267.306667 371.392l-45.226667 45.269333 278.741333 278.613334 278.485334-278.613334-45.248-45.248z" p-id="5376" ></path>
            </svg>
            <svg  class="icon icon-right" 
              style="display: none;"
              viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg"  width="20" height="20" fill="#777">
              <path d="M593.450667 512.128L360.064 278.613333l45.290667-45.226666 278.613333 278.762666L405.333333 790.613333l-45.226666-45.269333z" p-id="5605" ></path>
            </svg>
          
          </i>
          <b>4.1. </b>Sharding-JDBC
          
      </a>
      
      
        <ul>
          
          
            
          
          
          
        
          
            
            


 
  
    
    <li data-nav-id="/en/manual/sharding-jdbc/usage/" title="Manual" class="dd-item 
        
        
        
        ">
            
      <a href="https://shardingsphere.apache.org/document/current/en/manual/sharding-jdbc/usage/">
         <i class="collapse" style="display:inline; font-family:'courier';">
         
             <svg  class="icon icon-down" 
              style="display: none;"
              viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg"   width="20" height="20" fill="#777">
              <path d="M500.8 604.778667L267.306667 371.392l-45.226667 45.269333 278.741333 278.613334 278.485334-278.613334-45.248-45.248z" p-id="5376" ></path>
            </svg>
            <svg  class="icon icon-right" 
              style="display: inline-block;"
              viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg"  width="20" height="20" fill="#777">
              <path d="M593.450667 512.128L360.064 278.613333l45.290667-45.226666 278.613333 278.762666L405.333333 790.613333l-45.226666-45.269333z" p-id="5605" ></path>
            </svg>
          
          </i>
          <b>4.1.1. </b>Manual
          
      </a>
      
      
        <ul>
          
          
          
          
        
          
            
            


 
  
    
      <li data-nav-id="/en/manual/sharding-jdbc/usage/sharding/" title="Sharding" class="dd-item ">
        <a href="https://shardingsphere.apache.org/document/current/en/manual/sharding-jdbc/usage/sharding/">
          <svg  viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="5375" width="20" height="20"></svg>
        Sharding
        
        </a>
    </li>
     
  
 

            
          
            
            


 
  
    
      <li data-nav-id="/en/manual/sharding-jdbc/usage/read-write-splitting/" title="Read-write Split" class="dd-item ">
        <a href="https://shardingsphere.apache.org/document/current/en/manual/sharding-jdbc/usage/read-write-splitting/">
          <svg  viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="5375" width="20" height="20"></svg>
        Read-write Split
        
        </a>
    </li>
     
  
 

            
          
            
            


 
  
    
      <li data-nav-id="/en/manual/sharding-jdbc/usage/hint/" title="Hint" class="dd-item ">
        <a href="https://shardingsphere.apache.org/document/current/en/manual/sharding-jdbc/usage/hint/">
          <svg  viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="5375" width="20" height="20"></svg>
        Hint
        
        </a>
    </li>
     
  
 

            
          
            
            


 
  
    
      <li data-nav-id="/en/manual/sharding-jdbc/usage/orchestration/" title="Orchestration" class="dd-item ">
        <a href="https://shardingsphere.apache.org/document/current/en/manual/sharding-jdbc/usage/orchestration/">
          <svg  viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="5375" width="20" height="20"></svg>
        Orchestration
        
        </a>
    </li>
     
  
 

            
          
            
            


 
  
    
      <li data-nav-id="/en/manual/sharding-jdbc/usage/transaction/" title="Distributed Transaction" class="dd-item ">
        <a href="https://shardingsphere.apache.org/document/current/en/manual/sharding-jdbc/usage/transaction/">
          <svg  viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="5375" width="20" height="20"></svg>
        Distributed Transaction
        
        </a>
    </li>
     
  
 

            
          
            
            


 
  
    
      <li data-nav-id="/en/manual/sharding-jdbc/usage/encrypt/" title="Data Masking" class="dd-item ">
        <a href="https://shardingsphere.apache.org/document/current/en/manual/sharding-jdbc/usage/encrypt/">
          <svg  viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="5375" width="20" height="20"></svg>
        Data Masking
        
        </a>
    </li>
     
  
 

            
          
        
        </ul>
              
    </li>
  
 

            
          
            
            


 
  
    
    <li data-nav-id="/en/manual/sharding-jdbc/configuration/" title="Configuration manual" class="dd-item 
        parent
        
        
        ">
            
      <a href="https://shardingsphere.apache.org/document/current/en/manual/sharding-jdbc/configuration/">
         <i class="collapse" style="display:inline; font-family:'courier';">
         
             <svg  class="icon icon-down" 
              style="display: inline-block;"
              viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg"   width="20" height="20" fill="#777">
              <path d="M500.8 604.778667L267.306667 371.392l-45.226667 45.269333 278.741333 278.613334 278.485334-278.613334-45.248-45.248z" p-id="5376" ></path>
            </svg>
            <svg  class="icon icon-right" 
              style="display: none;"
              viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg"  width="20" height="20" fill="#777">
              <path d="M593.450667 512.128L360.064 278.613333l45.290667-45.226666 278.613333 278.762666L405.333333 790.613333l-45.226666-45.269333z" p-id="5605" ></path>
            </svg>
          
          </i>
          <b>4.1.2. </b>Configuration manual
          
      </a>
      
      
        <ul>
          
          
          
          
        
          
            
            


 
  
    
      <li data-nav-id="/en/manual/sharding-jdbc/configuration/config-java/" title="Java Configuration" class="dd-item ">
        <a href="https://shardingsphere.apache.org/document/current/en/manual/sharding-jdbc/configuration/config-java/">
          <svg  viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="5375" width="20" height="20"></svg>
        Java Configuration
        
        </a>
    </li>
     
  
 

            
          
            
            


 
  
    
      <li data-nav-id="/en/manual/sharding-jdbc/configuration/config-yaml/" title="Yaml Configuration" class="dd-item ">
        <a href="https://shardingsphere.apache.org/document/current/en/manual/sharding-jdbc/configuration/config-yaml/">
          <svg  viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="5375" width="20" height="20"></svg>
        Yaml Configuration
        
        </a>
    </li>
     
  
 

            
          
            
            


 
  
    
      <li data-nav-id="/en/manual/sharding-jdbc/configuration/config-spring-boot/" title="Spring Boot Configuration" class="dd-item ">
        <a href="https://shardingsphere.apache.org/document/current/en/manual/sharding-jdbc/configuration/config-spring-boot/">
          <svg  viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="5375" width="20" height="20"></svg>
        Spring Boot Configuration
        
        </a>
    </li>
     
  
 

            
          
            
            


 
  
    
      <li data-nav-id="/en/manual/sharding-jdbc/configuration/config-spring-namespace/" title="Spring Namespace Configuration" class="dd-item active">
        <a href="https://shardingsphere.apache.org/document/current/en/manual/sharding-jdbc/configuration/config-spring-namespace/">
          <svg  viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="5375" width="20" height="20"></svg>
        Spring Namespace Configuration
        
        </a>
    </li>
     
  
 

            
          
        
        </ul>
              
    </li>
  
 

            
          
            
            


 
  
    
      <li data-nav-id="/en/manual/sharding-jdbc/unsupported-items/" title="Unsupported JDBC Items" class="dd-item ">
        <a href="https://shardingsphere.apache.org/document/current/en/manual/sharding-jdbc/unsupported-items/">
          <svg  viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="5375" width="20" height="20"></svg>
        <b>4.1.3. </b>Unsupported JDBC Items
        
        </a>
    </li>
     
  
 

            
          
        
        </ul>
              
    </li>
  
 

            
          
            
            


 
  
    
    <li data-nav-id="/en/manual/sharding-proxy/" title="Sharding-Proxy" class="dd-item 
        
        
        
        ">
            
      <a href="https://shardingsphere.apache.org/document/current/en/manual/sharding-proxy/">
         <i class="collapse" style="display:inline; font-family:'courier';">
         
             <svg  class="icon icon-down" 
              style="display: none;"
              viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg"   width="20" height="20" fill="#777">
              <path d="M500.8 604.778667L267.306667 371.392l-45.226667 45.269333 278.741333 278.613334 278.485334-278.613334-45.248-45.248z" p-id="5376" ></path>
            </svg>
            <svg  class="icon icon-right" 
              style="display: inline-block;"
              viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg"  width="20" height="20" fill="#777">
              <path d="M593.450667 512.128L360.064 278.613333l45.290667-45.226666 278.613333 278.762666L405.333333 790.613333l-45.226666-45.269333z" p-id="5605" ></path>
            </svg>
          
          </i>
          <b>4.2. </b>Sharding-Proxy
          
      </a>
      
      
        <ul>
          
          
          
          
        
          
            
            


 
  
    
      <li data-nav-id="/en/manual/sharding-proxy/usage/" title="Manual" class="dd-item ">
        <a href="https://shardingsphere.apache.org/document/current/en/manual/sharding-proxy/usage/">
          <svg  viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="5375" width="20" height="20"></svg>
        <b>4.2.1. </b>Manual
        
        </a>
    </li>
     
  
 

            
          
            
            


 
  
    
      <li data-nav-id="/en/manual/sharding-proxy/configuration/" title="Configuration Manual" class="dd-item ">
        <a href="https://shardingsphere.apache.org/document/current/en/manual/sharding-proxy/configuration/">
          <svg  viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="5375" width="20" height="20"></svg>
        <b>4.2.2. </b>Configuration Manual
        
        </a>
    </li>
     
  
 

            
          
            
            


 
  
    
      <li data-nav-id="/en/manual/sharding-proxy/docker/" title="Docker Clone" class="dd-item ">
        <a href="https://shardingsphere.apache.org/document/current/en/manual/sharding-proxy/docker/">
          <svg  viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="5375" width="20" height="20"></svg>
        <b>4.2.3. </b>Docker Clone
        
        </a>
    </li>
     
  
 

            
          
        
        </ul>
              
    </li>
  
 

            
          
            
            


 
  
    
    <li data-nav-id="/en/manual/sharding-sidecar/" title="Sharding-Sidecar" class="dd-item 
        
        
        
        ">
            
      <a href="https://shardingsphere.apache.org/document/current/en/manual/sharding-sidecar/">
         <i class="collapse" style="display:inline; font-family:'courier';">
         
            <svg  viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="5375" width="20" height="20"></svg>
          
          </i>
          <b>4.3. </b>Sharding-Sidecar
          
      </a>
      
              
    </li>
  
 

            
          
            
            


 
  
    
    <li data-nav-id="/en/manual/sharding-ui/" title="Sharding-UI" class="dd-item 
        
        
        
        ">
            
      <a href="https://shardingsphere.apache.org/document/current/en/manual/sharding-ui/">
         <i class="collapse" style="display:inline; font-family:'courier';">
         
             <svg  class="icon icon-down" 
              style="display: none;"
              viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg"   width="20" height="20" fill="#777">
              <path d="M500.8 604.778667L267.306667 371.392l-45.226667 45.269333 278.741333 278.613334 278.485334-278.613334-45.248-45.248z" p-id="5376" ></path>
            </svg>
            <svg  class="icon icon-right" 
              style="display: inline-block;"
              viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg"  width="20" height="20" fill="#777">
              <path d="M593.450667 512.128L360.064 278.613333l45.290667-45.226666 278.613333 278.762666L405.333333 790.613333l-45.226666-45.269333z" p-id="5605" ></path>
            </svg>
          
          </i>
          <b>4.4. </b>Sharding-UI
          
      </a>
      
      
        <ul>
          
          
            
          
          
          
        
          
            
            


 
  
    
    <li data-nav-id="/en/manual/sharding-ui/usage/" title="Manual" class="dd-item 
        
        
        
        ">
            
      <a href="https://shardingsphere.apache.org/document/current/en/manual/sharding-ui/usage/">
         <i class="collapse" style="display:inline; font-family:'courier';">
         
             <svg  class="icon icon-down" 
              style="display: none;"
              viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg"   width="20" height="20" fill="#777">
              <path d="M500.8 604.778667L267.306667 371.392l-45.226667 45.269333 278.741333 278.613334 278.485334-278.613334-45.248-45.248z" p-id="5376" ></path>
            </svg>
            <svg  class="icon icon-right" 
              style="display: inline-block;"
              viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg"  width="20" height="20" fill="#777">
              <path d="M593.450667 512.128L360.064 278.613333l45.290667-45.226666 278.613333 278.762666L405.333333 790.613333l-45.226666-45.269333z" p-id="5605" ></path>
            </svg>
          
          </i>
          <b>4.4.1. </b>Manual
          
      </a>
      
      
        <ul>
          
          
          
          
        
          
            
            


 
  
    
      <li data-nav-id="/en/manual/sharding-ui/usage/build/" title="Build" class="dd-item ">
        <a href="https://shardingsphere.apache.org/document/current/en/manual/sharding-ui/usage/build/">
          <svg  viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="5375" width="20" height="20"></svg>
        Build
        
        </a>
    </li>
     
  
 

            
          
            
            


 
  
    
      <li data-nav-id="/en/manual/sharding-ui/usage/registry-center/" title="Registry Center" class="dd-item ">
        <a href="https://shardingsphere.apache.org/document/current/en/manual/sharding-ui/usage/registry-center/">
          <svg  viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="5375" width="20" height="20"></svg>
        Registry Center
        
        </a>
    </li>
     
  
 

            
          
        
        </ul>
              
    </li>
  
 

            
          
        
        </ul>
              
    </li>
  
 

            
          
        
        </ul>
              
    </li>
  
 

          
          


 
  
    
    <li data-nav-id="/en/downloads/" title="Downloads" class="dd-item 
        
        
        
        ">
            
      <a href="https://shardingsphere.apache.org/document/current/en/downloads/">
         <i class="collapse" style="display:inline; font-family:'courier';">
         
            <svg  viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="5375" width="20" height="20"></svg>
          
          </i>
          <b>5. </b>Downloads
          
      </a>
      
              
    </li>
  
 

          
          


 
  
    
    <li data-nav-id="/en/faq/" title="FAQ" class="dd-item 
        
        
        
        ">
            
      <a href="https://shardingsphere.apache.org/document/current/en/faq/">
         <i class="collapse" style="display:inline; font-family:'courier';">
         
            <svg  viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="5375" width="20" height="20"></svg>
          
          </i>
          <b>6. </b>FAQ
          
      </a>
      
              
    </li>
  
 

          
         
    </ul>

    
    

    
    <section id="prefooter">
      <hr/>
      <ul>
      
        <li>
          <a class="padding">
            <i class="fa fa-fw fa-language"></i>
          <div class="select-style">
            <select id="select-language" onchange="location = this.value;">
          
          
          
              
              
                  
                    
                    
<option id="en" value="/document/current/en/manual/sharding-jdbc/configuration/config-spring-namespace/" selected>English</option>
                    
                  
              
                  
              
          
              
              
                  
              
                  
                    
                    
<option id="cn" value="/document/current/cn/manual/sharding-jdbc/configuration/config-spring-namespace/">Chinese</option>
                    
                  
              
          
        </select>
        <svg version="1.1" id="Capa_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
          width="255px" height="255px" viewBox="0 0 255 255" style="enable-background:new 0 0 255 255;" xml:space="preserve">
          <g>
            <g id="arrow-drop-down">
              <polygon points="0,63.75 127.5,191.25 255,63.75 		" />
            </g>
          </g>
        </svg>
        </div>
        </a>
        </li>
       
      
      
      </ul>
    </section>
    
    <section id="footer">
      <p></p>

    </section>
  </div>
</nav>





        <section id="body">
        <div id="overlay"></div>
        <div class="padding highlightable">
              
              <div>
                <div id="top-bar">
                
                
                <div id="breadcrumbs" itemscope="" itemtype="http://data-vocabulary.org/Breadcrumb">
                    <span id="sidebar-toggle-span">
                        <a href="#" id="sidebar-toggle" data-sidebar-toggle="">
                          <i class="fa fa-bars"></i>
                        </a>
                    </span>
                  
                  <span id="toc-menu"><i class="fa fa-list-alt"></i></span>
                  
                  <span class="links">
                    
          
          
            
            
          
          
            
            
          
          
            
            
          
          
            
            
          
          
            <a href='https://shardingsphere.apache.org/document/current/en/'>ShardingSphere</a> > <a href='https://shardingsphere.apache.org/document/current/en/manual/'>User Manual</a> > <a href='https://shardingsphere.apache.org/document/current/en/manual/sharding-jdbc/'>Sharding-JDBC</a> > <a href='https://shardingsphere.apache.org/document/current/en/manual/sharding-jdbc/configuration/'>Configuration manual</a> > Spring Namespace Configuration
          
         
          
         
          
         
          
         
          
           
                  </span>
                </div>
                
                    <div class="progress">
    <div class="wrapper">
<nav id="TableOfContents">
<ul>
<li>
<ul>
<li><a href="#notice">Notice</a></li>
<li><a href="#example">Example</a>
<ul>
<li><a href="#sharding">Sharding</a></li>
<li><a href="#read-write-split">Read-Write Split</a></li>
<li><a href="#data-masking">Data Masking</a></li>
<li><a href="#sharding-read-write-splitting">Sharding + Read-write splitting</a></li>
<li><a href="#sharding-data-masking">Sharding + Data Masking</a></li>
<li><a href="#orchestration">Orchestration</a></li>
</ul></li>
<li><a href="#configuration-item-explanation">Configuration Item Explanation</a>
<ul>
<li><a href="#sharding-1">Sharding</a>
<ul>
<li><a href="#sharding-data-source">&lt;sharding:data-source /&gt;</a></li>
<li><a href="#sharding-sharding-rule">&lt;sharding:sharding-rule /&gt;</a></li>
<li><a href="#sharding-table-rules">&lt;sharding:table-rules /&gt;</a></li>
<li><a href="#sharding-table-rule">&lt;sharding:table-rule /&gt;</a></li>
<li><a href="#sharding-binding-table-rules">&lt;sharding:binding-table-rules /&gt;</a></li>
<li><a href="#sharding-binding-table-rule">&lt;sharding:binding-table-rule /&gt;</a></li>
<li><a href="#sharding-broadcast-table-rules">&lt;sharding:broadcast-table-rules /&gt;</a></li>
<li><a href="#sharding-broadcast-table-rule">&lt;sharding:broadcast-table-rule /&gt;</a></li>
<li><a href="#sharding-standard-strategy">&lt;sharding:standard-strategy /&gt;</a></li>
<li><a href="#sharding-complex-strategy">&lt;sharding:complex-strategy /&gt;</a></li>
<li><a href="#sharding-inline-strategy">&lt;sharding:inline-strategy /&gt;</a></li>
<li><a href="#sharding-hint-database-strategy">&lt;sharding:hint-database-strategy /&gt;</a></li>
<li><a href="#sharding-none-strategy">&lt;sharding:none-strategy /&gt;</a></li>
<li><a href="#sharding-key-generator">&lt;sharding:key-generator /&gt;</a></li>
<li><a href="#properties">Properties</a>
<ul>
<li><a href="#snowflake">SNOWFLAKE</a></li>
</ul></li>
<li><a href="#sharding-encrypt-rules">&lt;sharding:encrypt-rules /&gt;</a></li>
<li><a href="#sharding-encrypt-rule">&lt;sharding:encrypt-rule /&gt;</a></li>
<li><a href="#sharding-props">&lt;sharding:props /&gt;</a></li>
</ul></li>
<li><a href="#read-write-split-1">Read-Write Split</a>
<ul>
<li><a href="#master-slave-data-source">&lt;master-slave:data-source /&gt;</a></li>
<li><a href="#master-slave-props">&lt;master-slave:props /&gt;</a></li>
<li><a href="#master-slave-load-balance-algorithm">&lt;master-slave:load-balance-algorithm /&gt;</a></li>
</ul></li>
<li><a href="#data-masking-1">Data Masking</a>
<ul>
<li><a href="#encrypt-data-source">&lt;encrypt:data-source /&gt;</a></li>
<li><a href="#encrypt-encryptors">&lt;encrypt:encryptors /&gt;</a></li>
<li><a href="#encrypt-encryptor">&lt;encrypt:encryptor /&gt;</a></li>
<li><a href="#encrypt-tables">&lt;encrypt:tables /&gt;</a></li>
<li><a href="#encrypt-table">&lt;encrypt:table /&gt;</a></li>
<li><a href="#encrypt-column">&lt;encrypt:column /&gt;</a></li>
<li><a href="#encrypt-props">&lt;encrypt:props /&gt;</a></li>
</ul></li>
<li><a href="#data-sharding-orchestration">Data Sharding + Orchestration</a>
<ul>
<li><a href="#orchestration-master-slave-data-source">&lt;orchestration:master-slave-data-source /&gt;</a></li>
</ul></li>
<li><a href="#read-write-split-orchestration">Read-Write Split + Orchestration</a>
<ul>
<li><a href="#orchestration-sharding-data-source">&lt;orchestration:sharding-data-source /&gt;</a></li>
</ul></li>
<li><a href="#data-masking-orchestration">Data Masking + Orchestration</a>
<ul>
<li><a href="#orchestration-encrypt-data-source">&lt;orchestration:encrypt-data-source /&gt;</a></li>
</ul></li>
<li><a href="#orchestration-registry-center">Orchestration registry center</a>
<ul>
<li><a href="#orchestration-registry-center-1">&lt;orchestration:registry-center /&gt;</a></li>
</ul></li>
</ul></li>
</ul></li>
</ul>
</nav>
    </div>
</div>

                
              </div>
            </div>
            

        
        <div id="body-inner">
          
            <h1>Spring Namespace Configuration</h1>
          

        




<h2 id="notice">Notice</h2>

<p>Inline expression identifier can can use <code>${...}</code> or <code>$-&gt;{...}</code>, but the former one clashes with the placeholder in property documents of Spring, so it is suggested to use <code>$-&gt;{...}</code> for inline expression identifier under Spring environment.</p>

<h2 id="example">Example</h2>

<p>example: <a href="https://github.com/apache/incubator-shardingsphere-example/tree/dev/sharding-jdbc-example/sharding-example/sharding-spring-namespace-jpa-example/src/main/resources/META-INF">shardingsphere-example</a></p>

<h3 id="sharding">Sharding</h3>

<pre><code class="language-xml">&lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot;?&gt;
&lt;beans xmlns=&quot;http://www.springframework.org/schema/beans&quot;
       xmlns:xsi=&quot;http://www.w3.org/2001/XMLSchema-instance&quot;
       xmlns:p=&quot;http://www.springframework.org/schema/p&quot;
       xmlns:context=&quot;http://www.springframework.org/schema/context&quot;
       xmlns:tx=&quot;http://www.springframework.org/schema/tx&quot;
       xmlns:sharding=&quot;http://shardingsphere.apache.org/schema/shardingsphere/sharding&quot;
       xsi:schemaLocation=&quot;http://www.springframework.org/schema/beans
                        http://www.springframework.org/schema/beans/spring-beans.xsd
                        http://shardingsphere.apache.org/schema/shardingsphere/sharding
                        http://shardingsphere.apache.org/schema/shardingsphere/sharding/sharding.xsd
                        http://www.springframework.org/schema/context
                        http://www.springframework.org/schema/context/spring-context.xsd
                        http://www.springframework.org/schema/tx
                        http://www.springframework.org/schema/tx/spring-tx.xsd&quot;&gt;
    &lt;context:annotation-config /&gt;

    &lt;bean id=&quot;entityManagerFactory&quot; class=&quot;org.springframework.orm.jpa.LocalContainerEntityManagerFactoryBean&quot;&gt;
        &lt;property name=&quot;dataSource&quot; ref=&quot;shardingDataSource&quot; /&gt;
        &lt;property name=&quot;jpaVendorAdapter&quot;&gt;
            &lt;bean class=&quot;org.springframework.orm.jpa.vendor.HibernateJpaVendorAdapter&quot; p:database=&quot;MYSQL&quot; /&gt;
        &lt;/property&gt;
        &lt;property name=&quot;packagesToScan&quot; value=&quot;org.apache.shardingsphere.example.core.jpa.entity&quot; /&gt;
        &lt;property name=&quot;jpaProperties&quot;&gt;
            &lt;props&gt;
                &lt;prop key=&quot;hibernate.dialect&quot;&gt;org.hibernate.dialect.MySQLDialect&lt;/prop&gt;
                &lt;prop key=&quot;hibernate.hbm2ddl.auto&quot;&gt;create&lt;/prop&gt;
                &lt;prop key=&quot;hibernate.show_sql&quot;&gt;true&lt;/prop&gt;
            &lt;/props&gt;
        &lt;/property&gt;
    &lt;/bean&gt;
    &lt;bean id=&quot;transactionManager&quot; class=&quot;org.springframework.orm.jpa.JpaTransactionManager&quot; p:entityManagerFactory-ref=&quot;entityManagerFactory&quot; /&gt;
    &lt;tx:annotation-driven /&gt;

    &lt;bean id=&quot;ds0&quot; class=&quot;org.apache.commons.dbcp.BasicDataSource&quot; destroy-method=&quot;close&quot;&gt;
        &lt;property name=&quot;driverClassName&quot; value=&quot;com.mysql.jdbc.Driver&quot; /&gt;
        &lt;property name=&quot;url&quot; value=&quot;jdbc:mysql://localhost:3306/ds0&quot; /&gt;
        &lt;property name=&quot;username&quot; value=&quot;root&quot; /&gt;
        &lt;property name=&quot;password&quot; value=&quot;&quot; /&gt;
    &lt;/bean&gt;

    &lt;bean id=&quot;ds1&quot; class=&quot;org.apache.commons.dbcp.BasicDataSource&quot; destroy-method=&quot;close&quot;&gt;
        &lt;property name=&quot;driverClassName&quot; value=&quot;com.mysql.jdbc.Driver&quot; /&gt;
        &lt;property name=&quot;url&quot; value=&quot;jdbc:mysql://localhost:3306/ds1&quot; /&gt;
        &lt;property name=&quot;username&quot; value=&quot;root&quot; /&gt;
        &lt;property name=&quot;password&quot; value=&quot;&quot; /&gt;
    &lt;/bean&gt;

    &lt;bean id=&quot;preciseModuloDatabaseShardingAlgorithm&quot; class=&quot;org.apache.shardingsphere.example.algorithm.PreciseModuloShardingDatabaseAlgorithm&quot; /&gt;
    &lt;bean id=&quot;preciseModuloTableShardingAlgorithm&quot; class=&quot;org.apache.shardingsphere.example.algorithm.PreciseModuloShardingTableAlgorithm&quot; /&gt;

    &lt;sharding:standard-strategy id=&quot;databaseShardingStrategy&quot; sharding-column=&quot;user_id&quot; precise-algorithm-ref=&quot;preciseModuloDatabaseShardingAlgorithm&quot; /&gt;
    &lt;sharding:standard-strategy id=&quot;tableShardingStrategy&quot; sharding-column=&quot;order_id&quot; precise-algorithm-ref=&quot;preciseModuloTableShardingAlgorithm&quot; /&gt;

    &lt;sharding:key-generator id=&quot;orderKeyGenerator&quot; type=&quot;SNOWFLAKE&quot; column=&quot;order_id&quot; /&gt;
    &lt;sharding:key-generator id=&quot;itemKeyGenerator&quot; type=&quot;SNOWFLAKE&quot; column=&quot;order_item_id&quot; /&gt;

    &lt;sharding:data-source id=&quot;shardingDataSource&quot;&gt;
        &lt;sharding:sharding-rule data-source-names=&quot;ds0,ds1&quot;&gt;
            &lt;sharding:table-rules&gt;
                &lt;sharding:table-rule logic-table=&quot;t_order&quot; actual-data-nodes=&quot;ds$-&gt;{0..1}.t_order$-&gt;{0..1}&quot; database-strategy-ref=&quot;databaseShardingStrategy&quot; table-strategy-ref=&quot;tableShardingStrategy&quot; key-generator-ref=&quot;orderKeyGenerator&quot; /&gt;
                &lt;sharding:table-rule logic-table=&quot;t_order_item&quot; actual-data-nodes=&quot;ds$-&gt;{0..1}.t_order_item$-&gt;{0..1}&quot; database-strategy-ref=&quot;databaseShardingStrategy&quot; table-strategy-ref=&quot;tableShardingStrategy&quot; key-generator-ref=&quot;itemKeyGenerator&quot; /&gt;
            &lt;/sharding:table-rules&gt;
            &lt;sharding:binding-table-rules&gt;
                &lt;sharding:binding-table-rule logic-tables=&quot;t_order, t_order_item&quot; /&gt;
            &lt;/sharding:binding-table-rules&gt;
            &lt;sharding:broadcast-table-rules&gt;
                &lt;sharding:broadcast-table-rule table=&quot;t_config&quot; /&gt;
            &lt;/sharding:broadcast-table-rules&gt;
        &lt;/sharding:sharding-rule&gt;
    &lt;/sharding:data-source&gt;
&lt;/beans&gt;
</code></pre>

<h3 id="read-write-split">Read-Write Split</h3>

<pre><code class="language-xml">&lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot;?&gt;
&lt;beans xmlns=&quot;http://www.springframework.org/schema/beans&quot;
       xmlns:xsi=&quot;http://www.w3.org/2001/XMLSchema-instance&quot;
       xmlns:context=&quot;http://www.springframework.org/schema/context&quot;
       xmlns:p=&quot;http://www.springframework.org/schema/p&quot;
       xmlns:tx=&quot;http://www.springframework.org/schema/tx&quot;
       xmlns:master-slave=&quot;http://shardingsphere.apache.org/schema/shardingsphere/masterslave&quot;
       xsi:schemaLocation=&quot;http://www.springframework.org/schema/beans
                        http://www.springframework.org/schema/beans/spring-beans.xsd
                        http://www.springframework.org/schema/context
                        http://www.springframework.org/schema/context/spring-context.xsd
                        http://www.springframework.org/schema/tx
                        http://www.springframework.org/schema/tx/spring-tx.xsd
                        http://shardingsphere.apache.org/schema/shardingsphere/masterslave
                        http://shardingsphere.apache.org/schema/shardingsphere/masterslave/master-slave.xsd&quot;&gt;
    &lt;context:annotation-config /&gt;
    &lt;context:component-scan base-package=&quot;org.apache.shardingsphere.example.core.jpa&quot; /&gt;

    &lt;bean id=&quot;entityManagerFactory&quot; class=&quot;org.springframework.orm.jpa.LocalContainerEntityManagerFactoryBean&quot;&gt;
        &lt;property name=&quot;dataSource&quot; ref=&quot;masterSlaveDataSource&quot; /&gt;
        &lt;property name=&quot;jpaVendorAdapter&quot;&gt;
            &lt;bean class=&quot;org.springframework.orm.jpa.vendor.HibernateJpaVendorAdapter&quot; p:database=&quot;MYSQL&quot; /&gt;
        &lt;/property&gt;
        &lt;property name=&quot;packagesToScan&quot; value=&quot;org.apache.shardingsphere.example.core.jpa.entity&quot; /&gt;
        &lt;property name=&quot;jpaProperties&quot;&gt;
            &lt;props&gt;
                &lt;prop key=&quot;hibernate.dialect&quot;&gt;org.hibernate.dialect.MySQLDialect&lt;/prop&gt;
                &lt;prop key=&quot;hibernate.hbm2ddl.auto&quot;&gt;create&lt;/prop&gt;
                &lt;prop key=&quot;hibernate.show_sql&quot;&gt;true&lt;/prop&gt;
            &lt;/props&gt;
        &lt;/property&gt;
    &lt;/bean&gt;
    &lt;bean id=&quot;transactionManager&quot; class=&quot;org.springframework.orm.jpa.JpaTransactionManager&quot; p:entityManagerFactory-ref=&quot;entityManagerFactory&quot; /&gt;
    &lt;tx:annotation-driven /&gt;

    &lt;bean id=&quot;ds_master&quot; class=&quot;org.apache.commons.dbcp.BasicDataSource&quot; destroy-method=&quot;close&quot;&gt;
        &lt;property name=&quot;driverClassName&quot; value=&quot;com.mysql.jdbc.Driver&quot; /&gt;
        &lt;property name=&quot;url&quot; value=&quot;jdbc:mysql://localhost:3306/ds_master&quot; /&gt;
        &lt;property name=&quot;username&quot; value=&quot;root&quot; /&gt;
        &lt;property name=&quot;password&quot; value=&quot;&quot; /&gt;
    &lt;/bean&gt;

    &lt;bean id=&quot;ds_slave0&quot; class=&quot;org.apache.commons.dbcp.BasicDataSource&quot; destroy-method=&quot;close&quot;&gt;
        &lt;property name=&quot;driverClassName&quot; value=&quot;com.mysql.jdbc.Driver&quot; /&gt;
        &lt;property name=&quot;url&quot; value=&quot;jdbc:mysql://localhost:3306/ds_slave0&quot; /&gt;
        &lt;property name=&quot;username&quot; value=&quot;root&quot; /&gt;
        &lt;property name=&quot;password&quot; value=&quot;&quot; /&gt;
    &lt;/bean&gt;

    &lt;bean id=&quot;ds_slave1&quot; class=&quot;org.apache.commons.dbcp.BasicDataSource&quot; destroy-method=&quot;close&quot;&gt;
        &lt;property name=&quot;driverClassName&quot; value=&quot;com.mysql.jdbc.Driver&quot; /&gt;
        &lt;property name=&quot;url&quot; value=&quot;jdbc:mysql://localhost:3306/ds_slave1&quot; /&gt;
        &lt;property name=&quot;username&quot; value=&quot;root&quot; /&gt;
        &lt;property name=&quot;password&quot; value=&quot;&quot; /&gt;
    &lt;/bean&gt;

    &lt;!-- 4.0.0-RC1 version load balance algorithm configuration --&gt;
    &lt;!-- &lt;bean id=&quot;randomStrategy&quot; class=&quot;org.apache.shardingsphere.example.spring.namespace.algorithm.masterslave.RandomMasterSlaveLoadBalanceAlgorithm&quot; /&gt; --&gt;

    &lt;!-- 4.0.0-RC2 and later version load balance algorithm configuration --&gt;
    &lt;master-slave:load-balance-algorithm id=&quot;randomStrategy&quot; type=&quot;RANDOM&quot; /&gt;

    &lt;master-slave:data-source id=&quot;masterSlaveDataSource&quot; master-data-source-name=&quot;ds_master&quot; slave-data-source-names=&quot;ds_slave0, ds_slave1&quot; strategy-ref=&quot;randomStrategy&quot;&gt;
        &lt;master-slave:props&gt;
            &lt;prop key=&quot;sql.show&quot;&gt;true&lt;/prop&gt;
            &lt;prop key=&quot;executor.size&quot;&gt;10&lt;/prop&gt;
            &lt;prop key=&quot;foo&quot;&gt;bar&lt;/prop&gt;
        &lt;/master-slave:props&gt;
    &lt;/master-slave:data-source&gt;
&lt;/beans&gt;
</code></pre>

<h3 id="data-masking">Data Masking</h3>

<pre><code class="language-xml">&lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot;?&gt;
&lt;beans xmlns=&quot;http://www.springframework.org/schema/beans&quot;
       xmlns:xsi=&quot;http://www.w3.org/2001/XMLSchema-instance&quot;
       xmlns:encrypt=&quot;http://shardingsphere.apache.org/schema/shardingsphere/encrypt&quot;
       xmlns:bean=&quot;http://www.springframework.org/schema/util&quot;
       xsi:schemaLocation=&quot;http://www.springframework.org/schema/beans
                        http://www.springframework.org/schema/beans/spring-beans.xsd 
                        http://shardingsphere.apache.org/schema/shardingsphere/encrypt
                        http://shardingsphere.apache.org/schema/shardingsphere/encrypt/encrypt.xsd 
                        http://www.springframework.org/schema/util 
                        http://www.springframework.org/schema/util/spring-util.xsd&quot;&gt;
   
    &lt;bean id=&quot;ds&quot; class=&quot;com.zaxxer.hikari.HikariDataSource&quot; destroy-method=&quot;close&quot;&gt;
        &lt;property name=&quot;driverClassName&quot; value=&quot;com.mysql.jdbc.Driver&quot;/&gt;
        &lt;property name=&quot;jdbcUrl&quot; value=&quot;jdbc:mysql://localhost:3306/demo_ds?useSSL=false&amp;amp;useUnicode=true&amp;amp;characterEncoding=UTF-8&quot;/&gt;
        &lt;property name=&quot;username&quot; value=&quot;root&quot;/&gt;
        &lt;property name=&quot;password&quot; value=&quot;&quot;/&gt;
    &lt;/bean&gt;
    
    &lt;bean:properties id=&quot;props&quot;&gt;
        &lt;prop key=&quot;aes.key.value&quot;&gt;123456&lt;/prop&gt;
    &lt;/bean:properties&gt;
    
    &lt;encrypt:data-source id=&quot;encryptDataSource&quot; data-source-name=&quot;ds&quot; &gt;
        &lt;encrypt:encrypt-rule&gt;
            &lt;encrypt:tables&gt;
                &lt;encrypt:table name=&quot;t_order&quot;&gt;
                    &lt;encrypt:column logic-column=&quot;user_id&quot; plain-column=&quot;user_decrypt&quot; cipher-column=&quot;user_encrypt&quot; assisted-query-column=&quot;user_assisted&quot; encryptor-ref=&quot;encryptor_aes&quot; /&gt;
                    &lt;encrypt:column logic-column=&quot;order_id&quot; plain-column=&quot;order_decrypt&quot; cipher-column=&quot;order_encrypt&quot; assisted-query-column=&quot;order_assisted&quot; encryptor-ref=&quot;encryptor_md5&quot;/&gt;
                &lt;/encrypt:table&gt;
            &lt;/encrypt:tables&gt;
            &lt;encrypt:encryptors&gt;
                &lt;encrypt:encryptor id=&quot;encryptor_aes&quot; type=&quot;AES&quot; props-ref=&quot;props&quot;/&gt;
                &lt;encrypt:encryptor id=&quot;encryptor_md5&quot; type=&quot;MD5&quot; /&gt;
            &lt;/encrypt:encryptors&gt;
        &lt;/encrypt:encrypt-rule&gt;
        &lt;encrypt:props&gt;
            &lt;prop key=&quot;sql.show&quot;&gt;true&lt;/prop&gt;
            &lt;prop key=&quot;query.with.cipher.column&quot;&gt;true&lt;/prop&gt;
        &lt;/encrypt:props&gt;
    &lt;/encrypt:data-source&gt;
 &lt;/beans&gt;
</code></pre>

<h3 id="sharding-read-write-splitting">Sharding + Read-write splitting</h3>

<pre><code class="language-xml">&lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot;?&gt;
&lt;beans xmlns=&quot;http://www.springframework.org/schema/beans&quot;
       xmlns:xsi=&quot;http://www.w3.org/2001/XMLSchema-instance&quot;
       xmlns:p=&quot;http://www.springframework.org/schema/p&quot;
       xmlns:context=&quot;http://www.springframework.org/schema/context&quot;
       xmlns:tx=&quot;http://www.springframework.org/schema/tx&quot;
       xmlns:sharding=&quot;http://shardingsphere.apache.org/schema/shardingsphere/sharding&quot;
       xmlns:master-slave=&quot;http://shardingsphere.apache.org/schema/shardingsphere/masterslave&quot;
       xsi:schemaLocation=&quot;http://www.springframework.org/schema/beans
                        http://www.springframework.org/schema/beans/spring-beans.xsd
                        http://www.springframework.org/schema/context
                        http://www.springframework.org/schema/context/spring-context.xsd
                        http://www.springframework.org/schema/tx
                        http://www.springframework.org/schema/tx/spring-tx.xsd
                        http://shardingsphere.apache.org/schema/shardingsphere/sharding
                        http://shardingsphere.apache.org/schema/shardingsphere/sharding/sharding.xsd
                        http://shardingsphere.apache.org/schema/shardingsphere/masterslave
                        http://shardingsphere.apache.org/schema/shardingsphere/masterslave/master-slave.xsd&quot;&gt;
    &lt;context:annotation-config /&gt;
    &lt;context:component-scan base-package=&quot;org.apache.shardingsphere.example.core.jpa&quot; /&gt;

    &lt;bean id=&quot;entityManagerFactory&quot; class=&quot;org.springframework.orm.jpa.LocalContainerEntityManagerFactoryBean&quot;&gt;
        &lt;property name=&quot;dataSource&quot; ref=&quot;shardingDataSource&quot; /&gt;
        &lt;property name=&quot;jpaVendorAdapter&quot;&gt;
            &lt;bean class=&quot;org.springframework.orm.jpa.vendor.HibernateJpaVendorAdapter&quot; p:database=&quot;MYSQL&quot; /&gt;
        &lt;/property&gt;
        &lt;property name=&quot;packagesToScan&quot; value=&quot;org.apache.shardingsphere.example.core.jpa.entity&quot; /&gt;
        &lt;property name=&quot;jpaProperties&quot;&gt;
            &lt;props&gt;
                &lt;prop key=&quot;hibernate.dialect&quot;&gt;org.hibernate.dialect.MySQLDialect&lt;/prop&gt;
                &lt;prop key=&quot;hibernate.hbm2ddl.auto&quot;&gt;create&lt;/prop&gt;
                &lt;prop key=&quot;hibernate.show_sql&quot;&gt;true&lt;/prop&gt;
            &lt;/props&gt;
        &lt;/property&gt;
    &lt;/bean&gt;
    &lt;bean id=&quot;transactionManager&quot; class=&quot;org.springframework.orm.jpa.JpaTransactionManager&quot; p:entityManagerFactory-ref=&quot;entityManagerFactory&quot; /&gt;
    &lt;tx:annotation-driven /&gt;

    &lt;bean id=&quot;ds_master0&quot; class=&quot;org.apache.commons.dbcp.BasicDataSource&quot; destroy-method=&quot;close&quot;&gt;
        &lt;property name=&quot;driverClassName&quot; value=&quot;com.mysql.jdbc.Driver&quot; /&gt;
        &lt;property name=&quot;url&quot; value=&quot;jdbc:mysql://localhost:3306/ds_master0&quot; /&gt;
        &lt;property name=&quot;username&quot; value=&quot;root&quot; /&gt;
        &lt;property name=&quot;password&quot; value=&quot;&quot; /&gt;
    &lt;/bean&gt;

    &lt;bean id=&quot;ds_master0_slave0&quot; class=&quot;org.apache.commons.dbcp.BasicDataSource&quot; destroy-method=&quot;close&quot;&gt;
        &lt;property name=&quot;driverClassName&quot; value=&quot;com.mysql.jdbc.Driver&quot; /&gt;
        &lt;property name=&quot;url&quot; value=&quot;jdbc:mysql://localhost:3306/ds_master0_slave0&quot; /&gt;
        &lt;property name=&quot;username&quot; value=&quot;root&quot; /&gt;
        &lt;property name=&quot;password&quot; value=&quot;&quot; /&gt;
    &lt;/bean&gt;

    &lt;bean id=&quot;ds_master0_slave1&quot; class=&quot;org.apache.commons.dbcp.BasicDataSource&quot; destroy-method=&quot;close&quot;&gt;
        &lt;property name=&quot;driverClassName&quot; value=&quot;com.mysql.jdbc.Driver&quot; /&gt;
        &lt;property name=&quot;url&quot; value=&quot;jdbc:mysql://localhost:3306/ds_master0_slave1&quot; /&gt;
        &lt;property name=&quot;username&quot; value=&quot;root&quot; /&gt;
        &lt;property name=&quot;password&quot; value=&quot;&quot; /&gt;
    &lt;/bean&gt;

    &lt;bean id=&quot;ds_master1&quot; class=&quot;org.apache.commons.dbcp.BasicDataSource&quot; destroy-method=&quot;close&quot;&gt;
        &lt;property name=&quot;driverClassName&quot; value=&quot;com.mysql.jdbc.Driver&quot; /&gt;
        &lt;property name=&quot;url&quot; value=&quot;jdbc:mysql://localhost:3306/ds_master1&quot; /&gt;
        &lt;property name=&quot;username&quot; value=&quot;root&quot; /&gt;
        &lt;property name=&quot;password&quot; value=&quot;&quot; /&gt;
    &lt;/bean&gt;

    &lt;bean id=&quot;ds_master1_slave0&quot; class=&quot;org.apache.commons.dbcp.BasicDataSource&quot; destroy-method=&quot;close&quot;&gt;
        &lt;property name=&quot;driverClassName&quot; value=&quot;com.mysql.jdbc.Driver&quot; /&gt;
        &lt;property name=&quot;url&quot; value=&quot;jdbc:mysql://localhost:3306/ds_master1_slave0&quot; /&gt;
        &lt;property name=&quot;username&quot; value=&quot;root&quot; /&gt;
        &lt;property name=&quot;password&quot; value=&quot;&quot; /&gt;
    &lt;/bean&gt;

    &lt;bean id=&quot;ds_master1_slave1&quot; class=&quot;org.apache.commons.dbcp.BasicDataSource&quot; destroy-method=&quot;close&quot;&gt;
        &lt;property name=&quot;driverClassName&quot; value=&quot;com.mysql.jdbc.Driver&quot; /&gt;
        &lt;property name=&quot;url&quot; value=&quot;jdbc:mysql://localhost:3306/ds_master1_slave1&quot; /&gt;
        &lt;property name=&quot;username&quot; value=&quot;root&quot; /&gt;
        &lt;property name=&quot;password&quot; value=&quot;&quot; /&gt;
    &lt;/bean&gt;

    &lt;!-- 4.0.0-RC1 version load balance algorithm configuration --&gt;
    &lt;!-- &lt;bean id=&quot;randomStrategy&quot; class=&quot;org.apache.shardingsphere.example.spring.namespace.algorithm.masterslave.RandomMasterSlaveLoadBalanceAlgorithm&quot; /&gt; --&gt;

    &lt;!-- 4.0.0-RC2 and later version load balance algorithm configuration --&gt;
    &lt;master-slave:load-balance-algorithm id=&quot;randomStrategy&quot; type=&quot;RANDOM&quot; /&gt;

    &lt;sharding:inline-strategy id=&quot;databaseStrategy&quot; sharding-column=&quot;user_id&quot; algorithm-expression=&quot;ds_ms$-&gt;{user_id % 2}&quot; /&gt;
    &lt;sharding:inline-strategy id=&quot;orderTableStrategy&quot; sharding-column=&quot;order_id&quot; algorithm-expression=&quot;t_order$-&gt;{order_id % 2}&quot; /&gt;
    &lt;sharding:inline-strategy id=&quot;orderItemTableStrategy&quot; sharding-column=&quot;order_id&quot; algorithm-expression=&quot;t_order_item$-&gt;{order_id % 2}&quot; /&gt;

    &lt;sharding:key-generator id=&quot;orderKeyGenerator&quot; type=&quot;SNOWFLAKE&quot; column=&quot;order_id&quot; /&gt;
    &lt;sharding:key-generator id=&quot;itemKeyGenerator&quot; type=&quot;SNOWFLAKE&quot; column=&quot;order_item_id&quot; /&gt;

    &lt;sharding:data-source id=&quot;shardingDataSource&quot;&gt;
        &lt;sharding:sharding-rule data-source-names=&quot;ds_master0,ds_master0_slave0,ds_master0_slave1,ds_master1,ds_master1_slave0,ds_master1_slave1&quot;&gt;
            &lt;sharding:master-slave-rules&gt;
                &lt;sharding:master-slave-rule id=&quot;ds_ms0&quot; master-data-source-name=&quot;ds_master0&quot; slave-data-source-names=&quot;ds_master0_slave0, ds_master0_slave1&quot; strategy-ref=&quot;randomStrategy&quot; /&gt;
                &lt;sharding:master-slave-rule id=&quot;ds_ms1&quot; master-data-source-name=&quot;ds_master1&quot; slave-data-source-names=&quot;ds_master1_slave0, ds_master1_slave1&quot; strategy-ref=&quot;randomStrategy&quot; /&gt;
            &lt;/sharding:master-slave-rules&gt;
            &lt;sharding:table-rules&gt;
                &lt;sharding:table-rule logic-table=&quot;t_order&quot; actual-data-nodes=&quot;ds_ms$-&gt;{0..1}.t_order$-&gt;{0..1}&quot; database-strategy-ref=&quot;databaseStrategy&quot; table-strategy-ref=&quot;orderTableStrategy&quot; key-generator-ref=&quot;orderKeyGenerator&quot; /&gt;
                &lt;sharding:table-rule logic-table=&quot;t_order_item&quot; actual-data-nodes=&quot;ds_ms$-&gt;{0..1}.t_order_item$-&gt;{0..1}&quot; database-strategy-ref=&quot;databaseStrategy&quot; table-strategy-ref=&quot;orderItemTableStrategy&quot; key-generator-ref=&quot;itemKeyGenerator&quot; /&gt;
            &lt;/sharding:table-rules&gt;
            &lt;sharding:binding-table-rules&gt;
                &lt;sharding:binding-table-rule logic-tables=&quot;t_order, t_order_item&quot; /&gt;
            &lt;/sharding:binding-table-rules&gt;
            &lt;sharding:broadcast-table-rules&gt;
                &lt;sharding:broadcast-table-rule table=&quot;t_config&quot; /&gt;
            &lt;/sharding:broadcast-table-rules&gt;
        &lt;/sharding:sharding-rule&gt;
    &lt;/sharding:data-source&gt;
&lt;/beans&gt;
</code></pre>

<h3 id="sharding-data-masking">Sharding + Data Masking</h3>

<pre><code class="language-xml">&lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot;?&gt;
&lt;beans xmlns=&quot;http://www.springframework.org/schema/beans&quot;
       xmlns:xsi=&quot;http://www.w3.org/2001/XMLSchema-instance&quot;
       xmlns:p=&quot;http://www.springframework.org/schema/p&quot;
       xmlns:context=&quot;http://www.springframework.org/schema/context&quot;
       xmlns:encrypt=&quot;http://shardingsphere.apache.org/schema/shardingsphere/encrypt&quot;
       xmlns:tx=&quot;http://www.springframework.org/schema/tx&quot;
       xmlns:bean=&quot;http://www.springframework.org/schema/util&quot;
       xmlns:sharding=&quot;http://shardingsphere.apache.org/schema/shardingsphere/sharding&quot;
       xsi:schemaLocation=&quot;http://www.springframework.org/schema/beans
                        http://www.springframework.org/schema/beans/spring-beans.xsd
                        http://shardingsphere.apache.org/schema/shardingsphere/sharding
                        http://shardingsphere.apache.org/schema/shardingsphere/sharding/sharding.xsd
                        http://www.springframework.org/schema/context
                        http://www.springframework.org/schema/context/spring-context.xsd
                        http://shardingsphere.apache.org/schema/shardingsphere/encrypt
                        http://shardingsphere.apache.org/schema/shardingsphere/encrypt/encrypt.xsd
                        http://www.springframework.org/schema/tx
                        http://www.springframework.org/schema/tx/spring-tx.xsd
                        http://www.springframework.org/schema/util http://www.springframework.org/schema/util/spring-util.xsd&quot;&gt;
    &lt;import resource=&quot;classpath:META-INF/shardingTransaction.xml&quot;/&gt;
    &lt;context:annotation-config /&gt;
    &lt;context:component-scan base-package=&quot;org.apache.shardingsphere.example.core.jpa&quot;/&gt;

    &lt;bean id=&quot;entityManagerFactory&quot; class=&quot;org.springframework.orm.jpa.LocalContainerEntityManagerFactoryBean&quot;&gt;
        &lt;property name=&quot;dataSource&quot; ref=&quot;shardingDataSource&quot; /&gt;
        &lt;property name=&quot;jpaVendorAdapter&quot;&gt;
            &lt;bean class=&quot;org.springframework.orm.jpa.vendor.HibernateJpaVendorAdapter&quot; p:database=&quot;MYSQL&quot; /&gt;
        &lt;/property&gt;
        &lt;property name=&quot;packagesToScan&quot; value=&quot;org.apache.shardingsphere.example.core.jpa.entity&quot; /&gt;
        &lt;property name=&quot;jpaProperties&quot;&gt;
            &lt;props&gt;
                &lt;prop key=&quot;hibernate.dialect&quot;&gt;org.hibernate.dialect.MySQLDialect&lt;/prop&gt;
                &lt;prop key=&quot;hibernate.hbm2ddl.auto&quot;&gt;create-drop&lt;/prop&gt;
                &lt;prop key=&quot;hibernate.show_sql&quot;&gt;true&lt;/prop&gt;
            &lt;/props&gt;
        &lt;/property&gt;
    &lt;/bean&gt;
    &lt;bean id=&quot;transactionManager&quot; class=&quot;org.springframework.orm.jpa.JpaTransactionManager&quot; p:entityManagerFactory-ref=&quot;entityManagerFactory&quot; /&gt;
    &lt;tx:annotation-driven /&gt;

    &lt;bean id=&quot;demo_ds_0&quot; class=&quot;com.zaxxer.hikari.HikariDataSource&quot; destroy-method=&quot;close&quot;&gt;
        &lt;property name=&quot;driverClassName&quot; value=&quot;com.mysql.jdbc.Driver&quot;/&gt;
        &lt;property name=&quot;jdbcUrl&quot; value=&quot;jdbc:mysql://localhost:3306/demo_ds_0&quot;/&gt;
        &lt;property name=&quot;username&quot; value=&quot;root&quot;/&gt;
        &lt;property name=&quot;password&quot; value=&quot;&quot;/&gt;
        &lt;property name=&quot;maximumPoolSize&quot; value=&quot;16&quot;/&gt;
    &lt;/bean&gt;
    
    &lt;bean id=&quot;demo_ds_1&quot; class=&quot;com.zaxxer.hikari.HikariDataSource&quot; destroy-method=&quot;close&quot;&gt;
        &lt;property name=&quot;driverClassName&quot; value=&quot;com.mysql.jdbc.Driver&quot;/&gt;
        &lt;property name=&quot;jdbcUrl&quot; value=&quot;jdbc:mysql://localhost:3306/demo_ds_1&quot;/&gt;
        &lt;property name=&quot;username&quot; value=&quot;root&quot;/&gt;
        &lt;property name=&quot;password&quot; value=&quot;&quot;/&gt;
        &lt;property name=&quot;maximumPoolSize&quot; value=&quot;16&quot;/&gt;
    &lt;/bean&gt;

    &lt;sharding:inline-strategy id=&quot;databaseStrategy&quot; sharding-column=&quot;user_id&quot; algorithm-expression=&quot;demo_ds_${user_id % 2}&quot; /&gt;
    &lt;sharding:inline-strategy id=&quot;orderTableStrategy&quot; sharding-column=&quot;order_id&quot; algorithm-expression=&quot;t_order_${order_id % 2}&quot; /&gt;
    &lt;sharding:inline-strategy id=&quot;orderItemTableStrategy&quot; sharding-column=&quot;order_id&quot; algorithm-expression=&quot;t_order_item_${order_id % 2}&quot; /&gt;
    &lt;sharding:inline-strategy id=&quot;orderEncryptTableStrategy&quot; sharding-column=&quot;order_id&quot; algorithm-expression=&quot;t_order_encrypt_${order_id % 2}&quot; /&gt;

    &lt;sharding:key-generator id=&quot;orderKeyGenerator&quot; type=&quot;SNOWFLAKE&quot; column=&quot;order_id&quot; /&gt;
    &lt;sharding:key-generator id=&quot;itemKeyGenerator&quot; type=&quot;SNOWFLAKE&quot; column=&quot;order_item_id&quot; /&gt;

    &lt;bean:properties id=&quot;dataProtectorProps&quot;&gt;
        &lt;prop key=&quot;appToken&quot;&gt;business&lt;/prop&gt;
    &lt;/bean:properties&gt;

    &lt;sharding:data-source id=&quot;shardingDataSource&quot;&gt;
        &lt;sharding:sharding-rule data-source-names=&quot;demo_ds_0, demo_ds_1&quot;&gt;
            &lt;sharding:table-rules&gt;
                &lt;sharding:table-rule logic-table=&quot;t_order&quot; actual-data-nodes=&quot;demo_ds_${0..1}.t_order_${0..1}&quot; database-strategy-ref=&quot;databaseStrategy&quot; table-strategy-ref=&quot;orderTableStrategy&quot; key-generator-ref=&quot;orderKeyGenerator&quot; /&gt;
                &lt;sharding:table-rule logic-table=&quot;t_order_item&quot; actual-data-nodes=&quot;demo_ds_${0..1}.t_order_item_${0..1}&quot; database-strategy-ref=&quot;databaseStrategy&quot; table-strategy-ref=&quot;orderItemTableStrategy&quot; key-generator-ref=&quot;itemKeyGenerator&quot; /&gt;
            &lt;/sharding:table-rules&gt;
            &lt;sharding:encrypt-rule&gt;
                &lt;encrypt:tables&gt;
                    &lt;encrypt:table name=&quot;t_order&quot;&gt;
                        &lt;encrypt:column logic-column=&quot;user_id&quot; plain-column=&quot;user_decrypt&quot; cipher-column=&quot;user_encrypt&quot; assisted-query-column=&quot;user_assisted&quot; encryptor-ref=&quot;encryptor_aes&quot; /&gt;
                        &lt;encrypt:column logic-column=&quot;order_id&quot; plain-column=&quot;order_decrypt&quot; cipher-column=&quot;order_encrypt&quot; assisted-query-column=&quot;order_assisted&quot; encryptor-ref=&quot;encryptor_md5&quot;/&gt;
                    &lt;/encrypt:table&gt;
                &lt;/encrypt:tables&gt;
                &lt;encrypt:encryptors&gt;
                    &lt;encrypt:encryptor id=&quot;encryptor_aes&quot; type=&quot;AES&quot;  props-ref=&quot;props&quot;/&gt;
                    &lt;encrypt:encryptor id=&quot;encryptor_md5&quot; type=&quot;MD5&quot; /&gt;
                &lt;/encrypt:encryptors&gt;
            &lt;/sharding:encrypt-rule&gt;

        &lt;/sharding:sharding-rule&gt;

        &lt;sharding:props&gt;
            &lt;prop key=&quot;sql.show&quot;&gt;true&lt;/prop&gt;
        &lt;/sharding:props&gt;
    &lt;/sharding:data-source&gt;
     &lt;bean:properties id=&quot;props&quot;&gt;
        &lt;prop key=&quot;aes.key.value&quot;&gt;123456&lt;/prop&gt;
    &lt;/bean:properties&gt;
&lt;/beans&gt;
</code></pre>

<h3 id="orchestration">Orchestration</h3>

<pre><code class="language-xml">&lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot;?&gt;
&lt;beans xmlns=&quot;http://www.springframework.org/schema/beans&quot;
       xmlns:xsi=&quot;http://www.w3.org/2001/XMLSchema-instance&quot; 
       xmlns:sharding=&quot;http://shardingsphere.apache.org/schema/shardingsphere/orchestration/sharding&quot;
       xmlns:master-slave=&quot;http://shardingsphere.apache.org/schema/shardingsphere/orchestration/masterslave&quot;
       xmlns:reg=&quot;http://shardingsphere.apache.org/schema/shardingsphere/orchestration/reg&quot;
       xsi:schemaLocation=&quot;http://www.springframework.org/schema/beans
                           http://www.springframework.org/schema/beans/spring-beans.xsd
                           http://shardingsphere.apache.org/schema/shardingsphere/orchestration/reg 
                           http://shardingsphere.apache.org/schema/shardingsphere/orchestration/reg/reg.xsd
                           http://shardingsphere.apache.org/schema/shardingsphere/orchestration/sharding 
                           http://shardingsphere.apache.org/schema/shardingsphere/orchestration/sharding/sharding.xsd
                           http://shardingsphere.apache.org/schema/shardingsphere/orchestration/masterslave  
                           http://shardingsphere.apache.org/schema/shardingsphere/orchestration/masterslave/master-slave.xsd&quot;&gt;
    
    &lt;reg:registry-center id=&quot;regCenter&quot; type=&quot;zookeeper&quot; server-lists=&quot;localhost:2181&quot; namespace=&quot;orchestration-spring-namespace-demo&quot; overwtite=&quot;false&quot; /&gt;
    &lt;sharding:data-source id=&quot;shardingMasterSlaveDataSource&quot; registry-center-ref=&quot;regCenter&quot; /&gt;
    &lt;master-slave:data-source id=&quot;masterSlaveDataSource&quot; registry-center-ref=&quot;regCenter&quot; /&gt;
&lt;/beans&gt;
</code></pre>

<h2 id="configuration-item-explanation">Configuration Item Explanation</h2>

<h3 id="sharding-1">Sharding</h3>

<p>Namespace: <a href="http://shardingsphere.apache.org/schema/shardingsphere/sharding/sharding.xsd">http://shardingsphere.apache.org/schema/shardingsphere/sharding/sharding.xsd</a></p>

<h4 id="sharding-data-source">&lt;sharding:data-source /&gt;</h4>

<table>
<thead>
<tr>
<th><em>Name</em></th>
<th><em>Type</em></th>
<th><em>Description</em></th>
</tr>
</thead>

<tbody>
<tr>
<td>id</td>
<td>Attribute</td>
<td>Spring Bean Id</td>
</tr>

<tr>
<td>sharding-rule</td>
<td>Tag</td>
<td>Sharding rule configuration</td>
</tr>

<tr>
<td>props (?)</td>
<td>Tag</td>
<td>Properties</td>
</tr>
</tbody>
</table>

<h4 id="sharding-sharding-rule">&lt;sharding:sharding-rule /&gt;</h4>

<table>
<thead>
<tr>
<th><em>Name</em></th>
<th><em>Type</em></th>
<th><em>Description</em></th>
</tr>
</thead>

<tbody>
<tr>
<td>data-source-names</td>
<td>Attribute</td>
<td>Data source Bean list with comma separating multiple Beans</td>
</tr>

<tr>
<td>table-rules</td>
<td>Tag</td>
<td>Configuration objects of table sharding rules</td>
</tr>

<tr>
<td>binding-table-rules (?)</td>
<td>Tag</td>
<td>Binding table rule list</td>
</tr>

<tr>
<td>broadcast-table-rules (?)</td>
<td>Tag</td>
<td>Broadcast table rule list</td>
</tr>

<tr>
<td>default-data-source-name (?)</td>
<td>Attribute</td>
<td>Tables without sharding rules will be located through default data source</td>
</tr>

<tr>
<td>default-database-strategy-ref (?)</td>
<td>Attribute</td>
<td>Default database sharding strategy, which corresponds to id of &lt;sharding:xxx-strategy&gt;; default means the database is not split</td>
</tr>

<tr>
<td>default-table-strategy-ref (?)</td>
<td>Attribute</td>
<td>Default table sharding strategy,which corresponds to id of &lt;sharding:xxx-strategy&gt;;  default means the database is not split</td>
</tr>

<tr>
<td>default-key-generator (?)</td>
<td>Attribute</td>
<td>Default key generator configuration, use user-defined ones or built-in ones, e.g. SNOWFLAKE/UUID. Default key generator is <code>org.apache.shardingsphere.core.keygen.generator.impl.SnowflakeKeyGenerator</code></td>
</tr>

<tr>
<td>encrypt-rule (?)</td>
<td>Tag</td>
<td>Encrypt rule</td>
</tr>
</tbody>
</table>

<h4 id="sharding-table-rules">&lt;sharding:table-rules /&gt;</h4>

<table>
<thead>
<tr>
<th><em>Name</em></th>
<th><em>Type</em></th>
<th><em>Description</em></th>
</tr>
</thead>

<tbody>
<tr>
<td>table-rule (+)</td>
<td>Tag</td>
<td>Configuration objects of table sharding rules</td>
</tr>
</tbody>
</table>

<h4 id="sharding-table-rule">&lt;sharding:table-rule /&gt;</h4>

<table>
<thead>
<tr>
<th><em>Name</em></th>
<th><em>Type</em></th>
<th><em>Description</em></th>
</tr>
</thead>

<tbody>
<tr>
<td>logic-table</td>
<td>Attribute</td>
<td>Name of logic table</td>
</tr>

<tr>
<td>actual-data-nodes (?)</td>
<td>Attribute</td>
<td>Describe data source names and actual tables, delimiter as point, multiple data nodes separated with comma, support inline expression. Absent means sharding databases only. Example: ds${0..7}.tbl${0..7}</td>
</tr>

<tr>
<td>database-strategy-ref (?)</td>
<td>Attribute</td>
<td>Databases sharding strategy, use default databases sharding strategy if absent</td>
</tr>

<tr>
<td>table-strategy-ref (?)</td>
<td>Attribute</td>
<td>Tables sharding strategy, use default tables sharding strategy if absent</td>
</tr>

<tr>
<td>key-generator (?)</td>
<td>Attribute</td>
<td>Key generator, use default key generator if absent.</td>
</tr>
</tbody>
</table>

<h4 id="sharding-binding-table-rules">&lt;sharding:binding-table-rules /&gt;</h4>

<table>
<thead>
<tr>
<th><em>Name</em></th>
<th><em>Type</em></th>
<th><em>Description</em></th>
</tr>
</thead>

<tbody>
<tr>
<td>binding-table-rule (+)</td>
<td>Tag</td>
<td>Binding table rule configuration</td>
</tr>
</tbody>
</table>

<h4 id="sharding-binding-table-rule">&lt;sharding:binding-table-rule /&gt;</h4>

<table>
<thead>
<tr>
<th><em>Name</em></th>
<th><em>Type</em></th>
<th><em>Description</em></th>
</tr>
</thead>

<tbody>
<tr>
<td>logic-tables</td>
<td>Attribute</td>
<td>Logic table name bound with rules; multiple tables are separated by commas</td>
</tr>
</tbody>
</table>

<h4 id="sharding-broadcast-table-rules">&lt;sharding:broadcast-table-rules /&gt;</h4>

<table>
<thead>
<tr>
<th><em>Name</em></th>
<th><em>Type</em></th>
<th><em>Description</em></th>
</tr>
</thead>

<tbody>
<tr>
<td>broadcast-table-rule (+)</td>
<td>Tag</td>
<td>Broadcast table rules</td>
</tr>
</tbody>
</table>

<h4 id="sharding-broadcast-table-rule">&lt;sharding:broadcast-table-rule /&gt;</h4>

<table>
<thead>
<tr>
<th><em>Name</em></th>
<th><em>Type</em></th>
<th><em>Description</em></th>
</tr>
</thead>

<tbody>
<tr>
<td>tableAttribute</td>
<td>Attribute</td>
<td>Name of table</td>
</tr>
</tbody>
</table>

<h4 id="sharding-standard-strategy">&lt;sharding:standard-strategy /&gt;</h4>

<table>
<thead>
<tr>
<th><em>Name</em></th>
<th><em>Type</em></th>
<th><em>Description</em></th>
</tr>
</thead>

<tbody>
<tr>
<td>id</td>
<td>Attribute</td>
<td>Spring Bean Id</td>
</tr>

<tr>
<td>sharding-column</td>
<td>Attribute</td>
<td>Sharding column name</td>
</tr>

<tr>
<td>precise-algorithm-ref</td>
<td>Attribute</td>
<td>Precise algorithm reference, applied in <code>=</code> and <code>IN</code>; the class needs to implement <code>PreciseShardingAlgorithm</code> interface</td>
</tr>

<tr>
<td>range-algorithm-ref (?)</td>
<td>Attribute</td>
<td>Range algorithm reference, applied in <code>BETWEEN</code>; the class needs to implement <code>RangeShardingAlgorithm</code> interface</td>
</tr>
</tbody>
</table>

<h4 id="sharding-complex-strategy">&lt;sharding:complex-strategy /&gt;</h4>

<table>
<thead>
<tr>
<th><em>Name</em></th>
<th><em>Type</em></th>
<th><em>Description</em></th>
</tr>
</thead>

<tbody>
<tr>
<td>id</td>
<td>Attribute</td>
<td>Spring Bean Id</td>
</tr>

<tr>
<td>sharding-columns</td>
<td>Attribute</td>
<td>Sharding column name; multiple columns are separated by commas</td>
</tr>

<tr>
<td>algorithm-ref</td>
<td>Attribute</td>
<td>Complex sharding algorithm reference; the class needs to implement <code>ComplexKeysShardingAlgorithm</code> interface</td>
</tr>
</tbody>
</table>

<h4 id="sharding-inline-strategy">&lt;sharding:inline-strategy /&gt;</h4>

<table>
<thead>
<tr>
<th><em>Name</em></th>
<th><em>Type</em></th>
<th><em>Description</em></th>
</tr>
</thead>

<tbody>
<tr>
<td>id</td>
<td>Attribute</td>
<td>Spring Bean Id</td>
</tr>

<tr>
<td>sharding-column</td>
<td>Attribute</td>
<td>Sharding column name</td>
</tr>

<tr>
<td>algorithm-expression</td>
<td>Attribute</td>
<td>Sharding algorithm inline expression, which needs to conform to groovy statements</td>
</tr>
</tbody>
</table>

<h4 id="sharding-hint-database-strategy">&lt;sharding:hint-database-strategy /&gt;</h4>

<table>
<thead>
<tr>
<th><em>Name</em></th>
<th><em>Type</em></th>
<th><em>Description</em></th>
</tr>
</thead>

<tbody>
<tr>
<td>id</td>
<td>Attribute</td>
<td>Spring Bean Id</td>
</tr>

<tr>
<td>algorithm-ref</td>
<td>Attribute</td>
<td>Hint sharding algorithm; the class needs to implement <code>HintShardingAlgorithm</code> interface</td>
</tr>
</tbody>
</table>

<h4 id="sharding-none-strategy">&lt;sharding:none-strategy /&gt;</h4>

<table>
<thead>
<tr>
<th><em>Name</em></th>
<th><em>Type</em></th>
<th><em>Description</em></th>
</tr>
</thead>

<tbody>
<tr>
<td>id</td>
<td>Attribute</td>
<td>Spring Bean Id</td>
</tr>
</tbody>
</table>

<h4 id="sharding-key-generator">&lt;sharding:key-generator /&gt;</h4>

<table>
<thead>
<tr>
<th><em>Name</em></th>
<th><em>Type</em></th>
<th><em>Explanation</em></th>
</tr>
</thead>

<tbody>
<tr>
<td>column</td>
<td>Attribute</td>
<td>Auto-increment column name</td>
</tr>

<tr>
<td>type</td>
<td>Attribute</td>
<td>Auto-increment key generator <code>Type</code>; self-defined generator or internal Type generator (SNOWFLAKE/UUID) can both be selected</td>
</tr>

<tr>
<td>props-ref</td>
<td>Attribute</td>
<td>The Property configuration reference of key generators</td>
</tr>
</tbody>
</table>

<h4 id="properties">Properties</h4>

<p>Property configuration that can include these properties of these key generators.</p>

<h5 id="snowflake">SNOWFLAKE</h5>

<table>
<thead>
<tr>
<th><em>Name</em></th>
<th><em>DataType</em></th>
<th><em>Explanation</em></th>
</tr>
</thead>

<tbody>
<tr>
<td>worker.id (?)</td>
<td>long</td>
<td>The unique id for working machine, the default value is <code>0</code></td>
</tr>

<tr>
<td>max.tolerate.time.difference.milliseconds (?)</td>
<td>long</td>
<td>The max tolerate time for different server&rsquo;s time difference in milliseconds, the default value is <code>10</code></td>
</tr>

<tr>
<td>max.vibration.offset (?)</td>
<td>int</td>
<td>The max upper limit value of vibrate number, range <code>[0, 4096)</code>, the default value is <code>1</code>. Notice: To use the generated value of this algorithm as sharding value, it is recommended to configure this property. The algorithm generates key mod <code>2^n</code> (<code>2^n</code> is usually the sharding amount of tables or databases) in different milliseconds and the result is always <code>0</code> or <code>1</code>. To prevent the above sharding problem, it is recommended to configure this property, its value is <code>(2^n)-1</code></td>
</tr>
</tbody>
</table>

<h4 id="sharding-encrypt-rules">&lt;sharding:encrypt-rules /&gt;</h4>

<table>
<thead>
<tr>
<th><em>Name</em></th>
<th><em>Type</em></th>
<th><em>Explanation</em></th>
</tr>
</thead>

<tbody>
<tr>
<td>encryptor-rule (+)</td>
<td>Tag</td>
<td>Encryptor rule</td>
</tr>
</tbody>
</table>

<h4 id="sharding-encrypt-rule">&lt;sharding:encrypt-rule /&gt;</h4>

<table>
<thead>
<tr>
<th><em>Name</em></th>
<th><em>Type</em></th>
<th><em>Description</em></th>
</tr>
</thead>

<tbody>
<tr>
<td>encrypt:encrypt-rule(?)</td>
<td>Tag</td>
<td>Encrypt rule</td>
</tr>
</tbody>
</table>

<h4 id="sharding-props">&lt;sharding:props /&gt;</h4>

<table>
<thead>
<tr>
<th><em>Name</em></th>
<th><em>Type</em></th>
<th><em>Explanation</em></th>
</tr>
</thead>

<tbody>
<tr>
<td>sql.show (?)</td>
<td>Attribute</td>
<td>Show SQL or not; default value: false</td>
</tr>

<tr>
<td>executor.size (?)</td>
<td>Attribute</td>
<td>Executing thread number; default value: CPU core number</td>
</tr>

<tr>
<td>max.connections.size.per.query (?)</td>
<td>Attribute</td>
<td>The maximum connection number that each physical database allocates to each query; default value: 1</td>
</tr>

<tr>
<td>check.table.metadata.enabled (?)</td>
<td>Attribute</td>
<td>Whether to check meta-data consistency of sharding table when it initializes; default value: false</td>
</tr>

<tr>
<td>query.with.cipher.column (?)</td>
<td>Attribute</td>
<td>When there is a plainColumn, use cipherColumn or not to query, default value: true</td>
</tr>
</tbody>
</table>

<h3 id="read-write-split-1">Read-Write Split</h3>

<p>Namespace: <a href="http://shardingsphere.apache.org/schema/shardingsphere/masterslave/master-slave.xsd">http://shardingsphere.apache.org/schema/shardingsphere/masterslave/master-slave.xsd</a></p>

<h4 id="master-slave-data-source">&lt;master-slave:data-source /&gt;</h4>

<table>
<thead>
<tr>
<th><em>Name</em></th>
<th><em>Type</em></th>
<th><em>Explanation</em></th>
</tr>
</thead>

<tbody>
<tr>
<td>id</td>
<td>Attribute</td>
<td>Spring Bean id</td>
</tr>

<tr>
<td>master-data-source-name</td>
<td>Attribute</td>
<td>Bean id of data source in master database</td>
</tr>

<tr>
<td>slave-data-source-names</td>
<td>Attribute</td>
<td>Bean id list of data source in slave database; multiple Beans are separated by commas</td>
</tr>

<tr>
<td>strategy-ref (?)</td>
<td>Attribute</td>
<td>Slave database load balance algorithm reference; the class needs to implement <code>MasterSlaveLoadBalanceAlgorithm</code> interface</td>
</tr>

<tr>
<td>strategy-type (?)</td>
<td>Attribute</td>
<td>Load balance algorithm type of slave database; optional value: ROUND_ROBIN and RANDOM; if there is <code>load-balance-algorithm-class-name</code>, the configuration can be omitted</td>
</tr>

<tr>
<td>config-map (?)</td>
<td>Tag</td>
<td>Users&rsquo; self-defined configurations</td>
</tr>

<tr>
<td>props (?)</td>
<td>Tag</td>
<td>Attribute configurations</td>
</tr>
</tbody>
</table>

<h4 id="master-slave-props">&lt;master-slave:props /&gt;</h4>

<table>
<thead>
<tr>
<th><em>Name</em></th>
<th><em>Type</em></th>
<th><em>Explanation</em></th>
</tr>
</thead>

<tbody>
<tr>
<td>sql.show (?)</td>
<td>Attribute</td>
<td>Show SQL or not; default value: false</td>
</tr>

<tr>
<td>executor.size (?)</td>
<td>Attribute</td>
<td>Executing thread number; default value: CPU core number</td>
</tr>

<tr>
<td>max.connections.size.per.query (?)</td>
<td>Attribute</td>
<td>The maximum connection number that each physical database allocates to each query; default value: 1</td>
</tr>

<tr>
<td>check.table.metadata.enabled (?)</td>
<td>Attribute</td>
<td>Whether to check meta-data consistency of sharding table when it initializes; default value: false</td>
</tr>
</tbody>
</table>

<h4 id="master-slave-load-balance-algorithm">&lt;master-slave:load-balance-algorithm /&gt;</h4>

<p>4.0.0-RC2 version added</p>

<table>
<thead>
<tr>
<th><em>Name</em></th>
<th><em>Type</em></th>
<th><em>Explanation</em></th>
</tr>
</thead>

<tbody>
<tr>
<td>id</td>
<td>Attribute</td>
<td>Spring Bean Id</td>
</tr>

<tr>
<td>type</td>
<td>Attribute</td>
<td>Type of load balance algorithm, &lsquo;RANDOM&rsquo;或&rsquo;ROUND_ROBIN&rsquo;, support custom extension</td>
</tr>

<tr>
<td>props-ref (?)</td>
<td>Attribute</td>
<td>Properties of load balance algorithm</td>
</tr>
</tbody>
</table>

<h3 id="data-masking-1">Data Masking</h3>

<p>Namespace: <a href="http://shardingsphere.apache.org/schema/shardingsphere/encrypt/encrypt.xsd">http://shardingsphere.apache.org/schema/shardingsphere/encrypt/encrypt.xsd</a></p>

<h4 id="encrypt-data-source">&lt;encrypt:data-source /&gt;</h4>

<table>
<thead>
<tr>
<th><em>Name</em></th>
<th><em>Type</em></th>
<th><em>Type</em></th>
</tr>
</thead>

<tbody>
<tr>
<td>id</td>
<td>Attribute</td>
<td>Spring Bean Id</td>
</tr>

<tr>
<td>data-source-name</td>
<td>Attribute</td>
<td>Encrypt data source Bean Id</td>
</tr>

<tr>
<td>props (?)</td>
<td>Tag</td>
<td>Attribute configurations</td>
</tr>
</tbody>
</table>

<h4 id="encrypt-encryptors">&lt;encrypt:encryptors /&gt;</h4>

<table>
<thead>
<tr>
<th><em>Name</em></th>
<th><em>Type</em></th>
<th><em>Type</em></th>
</tr>
</thead>

<tbody>
<tr>
<td>encryptor(+)</td>
<td>Tag</td>
<td>Encryptor configuration</td>
</tr>
</tbody>
</table>

<h4 id="encrypt-encryptor">&lt;encrypt:encryptor /&gt;</h4>

<table>
<thead>
<tr>
<th><em>Name</em></th>
<th><em>Type</em></th>
<th><em>Explanation</em></th>
</tr>
</thead>

<tbody>
<tr>
<td>id</td>
<td>Attribute</td>
<td>Names of Encryptor</td>
</tr>

<tr>
<td>type</td>
<td>Attribute</td>
<td>Types of Encryptor, including MD5/AES or customize type</td>
</tr>

<tr>
<td>props-re</td>
<td>Attribute</td>
<td>Attribute configurations</td>
</tr>
</tbody>
</table>

<h4 id="encrypt-tables">&lt;encrypt:tables /&gt;</h4>

<table>
<thead>
<tr>
<th><em>Name</em></th>
<th><em>Type</em></th>
<th><em>Explanation</em></th>
</tr>
</thead>

<tbody>
<tr>
<td>table(+)</td>
<td>Tag</td>
<td>Encrypt table configuration</td>
</tr>
</tbody>
</table>

<h4 id="encrypt-table">&lt;encrypt:table /&gt;</h4>

<table>
<thead>
<tr>
<th><em>Name</em></th>
<th><em>Type</em></th>
<th><em>Explanation</em></th>
</tr>
</thead>

<tbody>
<tr>
<td>column(+)</td>
<td>Tag</td>
<td>Encrypt column configuration</td>
</tr>
</tbody>
</table>

<h4 id="encrypt-column">&lt;encrypt:column /&gt;</h4>

<table>
<thead>
<tr>
<th><em>Name</em></th>
<th><em>Type</em></th>
<th><em>Explanation</em></th>
</tr>
</thead>

<tbody>
<tr>
<td>logic-column</td>
<td>Attribute</td>
<td>Logic column name</td>
</tr>

<tr>
<td>plain-column</td>
<td>Attribute</td>
<td>Plain column name</td>
</tr>

<tr>
<td>cipher-column</td>
<td>Attribute</td>
<td>Cipher column name</td>
</tr>

<tr>
<td>assisted-query-columns</td>
<td>Attribute</td>
<td>AssistedColumns for query，when use ShardingQueryAssistedEncryptor, it can help query encrypted data</td>
</tr>
</tbody>
</table>

<h4 id="encrypt-props">&lt;encrypt:props /&gt;</h4>

<table>
<thead>
<tr>
<th><em>Name</em></th>
<th><em>Type</em></th>
<th><em>Explanation</em></th>
</tr>
</thead>

<tbody>
<tr>
<td>sql.show (?)</td>
<td>Attribute</td>
<td>Show SQL or not; default value: false</td>
</tr>

<tr>
<td>query.with.cipher.column (?)</td>
<td>Attribute</td>
<td>When there is a plainColumn, use cipherColumn or not to query, default value: true</td>
</tr>
</tbody>
</table>

<h3 id="data-sharding-orchestration">Data Sharding + Orchestration</h3>

<p>Namespace: <a href="http://shardingsphere.apache.org/schema/shardingsphere/orchestration/orchestration.xsd">http://shardingsphere.apache.org/schema/shardingsphere/orchestration/orchestration.xsd</a></p>

<h4 id="orchestration-master-slave-data-source">&lt;orchestration:master-slave-data-source /&gt;</h4>

<table>
<thead>
<tr>
<th><em>Name</em></th>
<th><em>Type</em></th>
<th><em>Explanation</em></th>
</tr>
</thead>

<tbody>
<tr>
<td>id</td>
<td>Attribute</td>
<td>ID</td>
</tr>

<tr>
<td>data-source-ref (?)</td>
<td>Attribute</td>
<td>Orchestrated database id</td>
</tr>

<tr>
<td>registry-center-ref</td>
<td>Attribute</td>
<td>Registry center id</td>
</tr>

<tr>
<td>overwrite</td>
<td>Attribute</td>
<td>Whether to overwrite local configurations with registry center configurations; if it can, each initialization should refer to local configurations; default means not to overwrite</td>
</tr>
</tbody>
</table>

<h3 id="read-write-split-orchestration">Read-Write Split + Orchestration</h3>

<p>Namespace: <a href="http://shardingsphere.apache.org/schema/shardingsphere/orchestration/orchestration.xsd">http://shardingsphere.apache.org/schema/shardingsphere/orchestration/orchestration.xsd</a></p>

<h4 id="orchestration-sharding-data-source">&lt;orchestration:sharding-data-source /&gt;</h4>

<table>
<thead>
<tr>
<th><em>Name</em></th>
<th><em>Type</em></th>
<th><em>Description</em></th>
</tr>
</thead>

<tbody>
<tr>
<td>id</td>
<td>Attribute</td>
<td>ID</td>
</tr>

<tr>
<td>data-source-ref (?)</td>
<td>Attribute</td>
<td>The id of data source to be orchestrated</td>
</tr>

<tr>
<td>registry-center-ref</td>
<td>Attribute</td>
<td>The id of registry center</td>
</tr>

<tr>
<td>overwrite</td>
<td>Attribute</td>
<td>Use local configuration to overwrite registry center or not</td>
</tr>
</tbody>
</table>

<h3 id="data-masking-orchestration">Data Masking + Orchestration</h3>

<p>Namespace: <a href="http://shardingsphere.apache.org/schema/shardingsphere/orchestration/orchestration.xsd">http://shardingsphere.apache.org/schema/shardingsphere/orchestration/orchestration.xsd</a></p>

<h4 id="orchestration-encrypt-data-source">&lt;orchestration:encrypt-data-source /&gt;</h4>

<table>
<thead>
<tr>
<th><em>Name</em></th>
<th><em>Type</em></th>
<th><em>Description</em></th>
</tr>
</thead>

<tbody>
<tr>
<td>id</td>
<td>Attribute</td>
<td>ID</td>
</tr>

<tr>
<td>data-source-ref (?)</td>
<td>Attribute</td>
<td>The id of data source to be orchestrated</td>
</tr>

<tr>
<td>registry-center-ref</td>
<td>Attribute</td>
<td>The id of registry center</td>
</tr>

<tr>
<td>overwrite</td>
<td>Attribute</td>
<td>Use local configuration to overwrite registry center or not</td>
</tr>
</tbody>
</table>

<h3 id="orchestration-registry-center">Orchestration registry center</h3>

<p>Namespace: <a href="http://shardingsphere.apache.org/schema/shardingsphere/orchestration/orchestration.xsd">http://shardingsphere.apache.org/schema/shardingsphere/orchestration/orchestration.xsd</a></p>

<h4 id="orchestration-registry-center-1">&lt;orchestration:registry-center /&gt;</h4>

<table>
<thead>
<tr>
<th><em>Name</em></th>
<th><em>Type</em></th>
<th><em>Description</em></th>
</tr>
</thead>

<tbody>
<tr>
<td>id</td>
<td>Attribute</td>
<td>Spring Bean Id of registry center</td>
</tr>

<tr>
<td>type</td>
<td>Attribute</td>
<td>Registry center type. Example:zookeeper</td>
</tr>

<tr>
<td>server-lists</td>
<td>Attribute</td>
<td>Registry servers list, multiple split as comma. Example: host1:2181,host2:2181</td>
</tr>

<tr>
<td>namespace (?)</td>
<td>Attribute</td>
<td>Namespace of registry</td>
</tr>

<tr>
<td>digest (?)</td>
<td>Attribute</td>
<td>Digest for registry. Default is not need digest</td>
</tr>

<tr>
<td>operation-timeout-milliseconds (?)</td>
<td>Attribute</td>
<td>Operation timeout time in milliseconds, default value is 500 seconds</td>
</tr>

<tr>
<td>max-retries (?)</td>
<td>Attribute</td>
<td>Max number of times to retry, default value is 3</td>
</tr>

<tr>
<td>retry-interval-milliseconds (?)</td>
<td>Attribute</td>
<td>Time interval in milliseconds on each retry, default value is 500 milliseconds</td>
</tr>

<tr>
<td>time-to-live-seconds (?)</td>
<td>Attribute</td>
<td>Living time of temporary nodes; default value: 60 seconds</td>
</tr>

<tr>
<td>props-ref (?)</td>
<td>Attribute</td>
<td>Other customize properties of registry center</td>
</tr>
</tbody>
</table>


<footer class=" footline" >
	
</footer>


        
        </div> 
        

      </div>

    <div id="navigation">
        
        
        
        
            
            
                
                    
                    
                
                

                    
                    
                        
                    
                    

                    
                        
            
            
                
                    
                        
                        
                    
                
                

                    
                    
                    

                    
            
        
                    
                        
            
            
                
                    
                
                

                    
                    
                    

                    
                        
            
            
                
                    
                
                

                    
                    
                    

                    
            
        
                    
                        
            
            
                
                    
                
                

                    
                    
                    

                    
            
        
                    
            
        
                    
                        
            
            
                
                    
                
                

                    
                    
                        
                    
                    

                    
                        
            
            
                
                    
                
                

                    
                    
                        
                    
                    

                    
                        
            
            
                
                    
                
                

                    
                    
                    

                    
                        
            
            
                
                    
                
                

                    
                    
                    

                    
            
        
                    
                        
            
            
                
                    
                
                

                    
                    
                    

                    
            
        
                    
                        
            
            
                
                    
                
                

                    
                    
                    

                    
            
        
                    
            
        
                    
                        
            
            
                
                    
                
                

                    
                    
                    

                    
                        
            
            
                
                    
                
                

                    
                    
                    

                    
            
        
                    
                        
            
            
                
                    
                
                

                    
                    
                    

                    
            
        
                    
                        
            
            
                
                    
                
                

                    
                    
                    

                    
            
        
                    
                        
            
            
                
                    
                
                

                    
                    
                    

                    
            
        
                    
                        
            
            
                
                    
                
                

                    
                    
                    

                    
            
        
                    
            
        
                    
                        
            
            
                
                    
                
                

                    
                    
                    

                    
                        
            
            
                
                    
                
                

                    
                    
                    

                    
            
        
                    
                        
            
            
                
                    
                
                

                    
                    
                    

                    
            
        
                    
                        
            
            
                
                    
                
                

                    
                    
                    

                    
            
        
                    
            
        
                    
                        
            
            
                
                    
                
                

                    
                    
                    

                    
                        
            
            
                
                    
                
                

                    
                    
                    

                    
            
        
                    
                        
            
            
                
                    
                
                

                    
                    
                    

                    
            
        
                    
                        
            
            
                
                    
                
                

                    
                    
                    

                    
            
        
                    
            
        
                    
            
        
                    
                        
            
            
                
                    
                
                

                    
                    
                    

                    
                        
            
            
                
                    
                
                

                    
                    
                    

                    
            
        
                    
                        
            
            
                
                    
                
                

                    
                    
                    

                    
            
        
                    
                        
            
            
                
                    
                
                

                    
                    
                    

                    
            
        
                    
            
        
                    
                        
            
            
                
                    
                
                

                    
                    
                    

                    
                        
            
            
                
                    
                
                

                    
                    
                    

                    
            
        
                    
                        
            
            
                
                    
                
                

                    
                    
                    

                    
            
        
                    
                        
            
            
                
                    
                
                

                    
                    
                    

                    
            
        
                    
                        
            
            
                
                    
                
                

                    
                    
                    

                    
            
        
                    
                        
            
            
                
                    
                
                

                    
                    
                    

                    
            
        
                    
            
        
                    
                        
            
            
                
                    
                
                

                    
                    
                        
                    
                    

                    
                        
            
            
                
                    
                
                

                    
                    
                    

                    
                        
            
            
                
                    
                
                

                    
                    
                    

                    
            
        
                    
                        
            
            
                
                    
                
                

                    
                    
                    

                    
            
        
                    
                        
            
            
                
                    
                
                

                    
                    
                    

                    
            
        
                    
            
        
                    
                        
            
            
                
                    
                
                

                    
                    
                    

                    
                        
            
            
                
                    
                
                

                    
                    
                    

                    
            
        
                    
                        
            
            
                
                    
                
                

                    
                    
                    

                    
            
        
                    
                        
            
            
                
                    
                
                

                    
                    
                    

                    
            
        
                    
                        
            
            
                
                    
                
                

                    
                    
                    

                    
            
        
                    
            
        
                    
                        
            
            
                
                    
                
                

                    
                    
                    

                    
                        
            
            
                
                    
                
                

                    
                    
                    

                    
            
        
                    
                        
            
            
                
                    
                
                

                    
                    
                    

                    
            
        
                    
                        
            
            
                
                    
                
                

                    
                    
                    

                    
            
        
                    
            
        
                    
            
        
                    
                        
            
            
                
                    
                
                

                    
                    
                    

                    
            
        
                    
                        
            
            
                
                    
                
                

                    
                    
                    

                    
                        
            
            
                
                    
                
                

                    
                    
                    

                    
            
        
                    
                        
            
            
                
                    
                
                

                    
                    
                    

                    
            
        
                    
                        
            
            
                
                    
                
                

                    
                    
                    

                    
            
        
                    
                        
            
            
                
                    
                
                

                    
                    
                    

                    
            
        
                    
                        
            
            
                
                    
                
                

                    
                    
                    

                    
            
        
                    
            
        
                    
            
        
                    
                        
            
            
                
                    
                    
                
                

                    
                    
                        
                    
                    

                    
                        
            
            
                
                    
                    
                
                

                    
                    
                        
                    
                    

                    
                        
            
            
                
                    
                        
                        
                    
                
                

                    
                    
                    

                    
                        
            
            
                
                    
                
                

                    
                    
                    

                    
            
        
                    
                        
            
            
                
                    
                
                

                    
                    
                    

                    
            
        
                    
                        
            
            
                
                    
                
                

                    
                    
                    

                    
            
        
                    
                        
            
            
                
                    
                
                

                    
                    
                    

                    
            
        
                    
                        
            
            
                
                    
                
                

                    
                    
                    

                    
            
        
                    
                        
            
            
                
                    
                
                

                    
                    
                    

                    
            
        
                    
            
        
                    
                        
            
            
                
                    
                    
                
                

                    
                    
                    

                    
                        
            
            
                
                    
                        
                        
                    
                
                

                    
                    
                    

                    
            
        
                    
                        
            
            
                
                    
                
                

                    
                    
                    

                    
            
        
                    
                        
            
            
                
                    
                
                

                    
                    
                    

                    
            
        
                    
                        
            
            
                
                    
                    
                
                

                    
                    
                    

                    
            
        
                    
            
        
                    
                        
            
            
                
                    
                        
                        
                    
                
                

                    
                    
                    

                    
            
        
                    
            
        
                    
                        
            
            
                
                    
                
                

                    
                    
                    

                    
                        
            
            
                
                    
                
                

                    
                    
                    

                    
            
        
                    
                        
            
            
                
                    
                
                

                    
                    
                    

                    
            
        
                    
                        
            
            
                
                    
                
                

                    
                    
                    

                    
            
        
                    
            
        
                    
                        
            
            
                
                    
                
                

                    
                    
                    

                    
            
        
                    
                        
            
            
                
                    
                
                

                    
                    
                        
                    
                    

                    
                        
            
            
                
                    
                
                

                    
                    
                    

                    
                        
            
            
                
                    
                
                

                    
                    
                    

                    
            
        
                    
                        
            
            
                
                    
                
                

                    
                    
                    

                    
            
        
                    
            
        
                    
            
        
                    
            
        
                    
                        
            
            
                
                    
                
                

                    
                    
                    

                    
            
        
                    
                        
            
            
                
                    
                
                

                    
                    
                    

                    
            
        
                    
            
        
        
        


        
            <a class="nav nav-prev" href="https://shardingsphere.apache.org/document/current/en/manual/sharding-jdbc/configuration/config-spring-boot/" title="Spring Boot Configuration"> <i class="fa fa-chevron-left"></i></a>
        
        
            <a class="nav nav-next" href="https://shardingsphere.apache.org/document/current/en/manual/sharding-jdbc/unsupported-items/" title="Unsupported JDBC Items" style="margin-right: 0px;"><i class="fa fa-chevron-right"></i></a>
        
    </div>

    </section>
    
    <div style="left: -1000px; overflow: scroll; position: absolute; top: -1000px; border: none; box-sizing: content-box; height: 200px; margin: 0px; padding: 0px; width: 200px;">
      <div style="border: none; box-sizing: content-box; height: 200px; margin: 0px; padding: 0px; width: 200px;"></div>
    </div>
    <script src="https://shardingsphere.apache.org/document/current/js/clipboard.min.js?1584863719"></script>
    <script src="https://shardingsphere.apache.org/document/current/js/perfect-scrollbar.min.js?1584863719"></script>
    <script src="https://shardingsphere.apache.org/document/current/js/perfect-scrollbar.jquery.min.js?1584863719"></script>
    <script src="https://shardingsphere.apache.org/document/current/js/jquery.sticky.js?1584863719"></script>
    <script src="https://shardingsphere.apache.org/document/current/js/featherlight.min.js?1584863719"></script>
    <script src="https://shardingsphere.apache.org/document/current/js/html5shiv-printshiv.min.js?1584863719"></script>
    <script src="https://shardingsphere.apache.org/document/current/js/highlight.pack.js?1584863719"></script>
    <script>hljs.initHighlightingOnLoad();</script>
    <script src="https://shardingsphere.apache.org/document/current/js/modernizr.custom.71422.js?1584863719"></script>
    <script src="https://shardingsphere.apache.org/document/current/js/learn.js?1584863719"></script>
    <script src="https://shardingsphere.apache.org/document/current/js/hugo-learn.js?1584863719"></script>

    <link href="https://shardingsphere.apache.org/document/current/mermaid/mermaid.css?1584863719" type="text/css" rel="stylesheet" />
    <script src="https://shardingsphere.apache.org/document/current/mermaid/mermaid.js?1584863719"></script>
    <script>
        mermaid.initialize({ startOnLoad: true });
    </script>
    

  </body>
</html>

